home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / bbs / cddk9606.zip / DOCS.ARJ / CONCERTO.DOC next >
Text File  |  1996-06-14  |  123KB  |  4,320 lines

  1.  
  2.  
  3.  
  4.  
  5.    ┌──────┐ ┌──────┐ ┌─────┐  ┌──────┐ ┌──────┐ ┌──────┐ ┌───────┐ ┌──────┐
  6.    └──────┘ └──────┘ └─────┘  └──────┘ └──────┘ └──────┘ └───────┘ └──────┘
  7.    ┌─┐      ┌─┐  ┌─┐ ┌─┐  ┌─┐ ┌─┐      ┌────┐   ┌──────┐    ┌─┐    ┌─┐  ┌─┐
  8.    │ │      │ │  │ │ │ │  │ │ │ │      │ ┌──┘   │ ┌─┐ ┌┘    │ │    │ │  │ │
  9.    │ └────┐ │ └──┘ │ │ │  │ │ │ └────┐ │ └────┐ │ │ │ │     │ │    │ └──┘ │
  10.    └──────┘ └──────┘ └─┘  └─┘ └──────┘ └──────┘ └─┘ └─┘     └─┘    └──────┘
  11.  
  12.  
  13.                                           The Concerto Door Development Kit
  14.                                               Version 960616 (Wide Beta #2)
  15.                               (c) 1996 David J. Pinch ∙ All Rights Reserved
  16.  
  17.  
  18.                                                    Dedicated to Kelly Wells
  19.                 "It is not the stars to hold our destiny but in ourselves."
  20.                                                               - Shakespeare
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.   1 Title
  28.  
  29.   2 Introduction                                            [search keyword]
  30.                                                             
  31.     Welcome ..................................................... /WELCOME
  32.     Features .................................................... /FEATURES
  33.     Requirements ................................................ /REQUIRE
  34.     Installation ................................................ /INSTALL
  35.     Release Schedule ............................................ /RELEASE
  36.  
  37.   3 Aspects of Concerto Doors
  38.  
  39.     Scripts ..................................................... /SCRIPTS
  40.     Macros ...................................................... /MACROS
  41.     Command-Line Parameters ..................................... /PARAMS
  42.     Color Protocols ............................................. /COLORS
  43.  
  44.   4 Programmer's Reference Manual
  45.  
  46.     Units ....................................................... /UNITS
  47.     Global Variables & Constants ................................ /GLOBAL
  48.     Format ...................................................... /FORMAT
  49.     Library ..................................................... /LIBRARY
  50.  
  51.  
  52.  
  53.  
  54.   ▀▀▀▀▀▀\                           
  55.       ▀▀\  Introduction to Concerto
  56.   ▀▀▀▀▀▀\
  57.   ▀▀\
  58.   ▀▀▀▀▀▀\
  59.  
  60.  
  61.   w e l c o m e                                                     /WELCOME
  62.   ──────────────────────────────────────────────────────────────────────────
  63.  
  64.   Concerto is a world-class door development kit for Turbo Pascal 7.0.
  65.   Concerto allows you to produce spectacular online games and utilities
  66.   with little effort.  You can spend your time designing an intricate
  67.   plot or drawing a set of ANSI screens -- instead of dealing with
  68.   the low-level mechanics of communications programming.
  69.  
  70.  
  71.   f e a t u r e s                                                  /FEATURES  
  72.   ──────────────────────────────────────────────────────────────────────────
  73.  
  74.   State-Driven Color System
  75.  
  76.     Concerto supports all mainstream color-code systems, including ANSI,
  77.     AVATAR, HexPipe, LORD (Legend of the Red Dragon), PCBoard at-codes,
  78.     RemoteAccess ^k codes, and WildCat! BBS codes.  Color codes are
  79.     converted and optimized at run-time.
  80.  
  81.  
  82.   Multi-Tasker Support
  83.  
  84.     Concerto releases time-slices to DesqView, DoubleDOS, TopView, Windows
  85.     and OS/2.  Concerto auto-senses SHARE, the DOS 5+ task switcher, and
  86.     many other enviromental factors that can affect operation of the door.
  87.  
  88.     Extended support has been provided for Windows and Windows 95.  You may
  89.     access the clipboard, maximize the DOS box, or change the title of the
  90.     application's window.
  91.  
  92.  
  93.   Script Interpreter
  94.  
  95.     Concerto has a built-in script interpreter with a rich library of
  96.     commands and variables.  You may use this library as-is, or make
  97.     your own.  You have the ability to make any variable in any unit
  98.     accessible to the sysop.
  99.  
  100.  
  101.   Sysop Power
  102.  
  103.     The sysop can create his own function keys, status lines, and command-
  104.     line parameters.  Every aspect of the initialization sequence is defined
  105.     in an external script -- right up to activating the FOSSIL driver and
  106.     setting up the chat-mode.
  107.  
  108.  
  109.   Extended Libraries
  110.  
  111.     Concerto is more than a simple door driver.  We've included hundreds
  112.     of support routines in a plethora of areas -- including DOS, rebooting,
  113.     lightbar'd menus, pChar support, VGA graphics and much more.  Our
  114.     top-down, organized approach to programming means that you'll be able
  115.     to use 90% of these routines in non-door enviroments.
  116.  
  117.  
  118.  
  119.   r e q u i r e m e n t s                                           /REQUIRE
  120.   ──────────────────────────────────────────────────────────────────────────
  121.  
  122.   Turbo Pascal 7.0
  123.  
  124.     Concerto uses many of the extensions provided in Turbo Pascal 7.0.
  125.     These include pChars (null-terminated strings), CONST parameters,
  126.     and OpenArrays.  We have no plans to support version 6.0 or earlier.
  127.  
  128.  
  129.   FOSSIL [Fido/Opus/SeaDOG Standard Interface Layer] Driver
  130.  
  131.     A FOSSIL driver allows a BBS or door to access your communications
  132.     hardware in a device-independent manner.  You must install a FOSSIL
  133.     driver specific to your hardware or operating system.  Drivers are
  134.     available for DOS, Windows 95 and OS/2.  (NOTE: doors running in local-
  135.     mode do not need a FOSSIL driver).
  136.  
  137.  
  138.   SHARE.EXE
  139.  
  140.     A file-sharing driver is required for multi-node operation.  SHARE
  141.     manages conflicts when two or more instances of the program try to
  142.     access the same file simultaneously.
  143.  
  144.  
  145.   EGA/VGA Video Card
  146.  
  147.     Some procedures and functions are disabled if an EGA or VGA graphics
  148.     card is not detected at startup.  Most of these effects are purely
  149.     for the enjoyment of the sysop and do not affect the functionality
  150.     of the software.
  151.  
  152.  
  153.  
  154.   i n s t a l l a t i o n                                           /INSTALL
  155.   ──────────────────────────────────────────────────────────────────────────
  156.  
  157.   1. Change to the Turbo Pascal directory (i.e. C:\TP).
  158.  
  159.   2. Make a directory for the Concerto units (i.e. C:\TP\CONCERTO).
  160.  
  161.   3. Copy the contents of the UNITS archive to this directory.
  162.  
  163.   4. You may wish to repeat steps 1-3 for the other archives.
  164.  
  165.      BBS_INFO . . . . . . . . Concerto GIF; ads for support BBSs
  166.      DOCS . . . . . . . . . . Documentation
  167.      FREE . . . . . . . . . . Royalty-free ANSI screens and sysop docs
  168.      HEADERS  . . . . . . . . Unit headers and additional documentation
  169.      TUTOR  . . . . . . . . . Tutorial series
  170.      UTIL . . . . . . . . . . Optional support utilities
  171.  
  172.   5. Run TURBO.EXE or TPX.EXE.
  173.  
  174.   6. Go to the Compiler Options menu (press ALT-O, then press C).
  175.  
  176.   7. Select the following options:
  177.  
  178.        [X] Force far calls . . . . . . . . . . . . . . ON
  179.        [X] Extended syntax . . . . . . . . . . . . . . ON
  180.  
  181.      Alternately, you may use these switches in your main program:
  182.  
  183.        {$F+}  { Force far calls }
  184.        {$X+}  { Extended syntax }
  185.  
  186.   8. Go to the Directories menu (from the IDE, press ALT-O, then D).
  187.  
  188.   9. Add the CONCERTO directory (step #1) to the INCLUDE DIRECTORIES list
  189.      and the UNIT DIRECTORIES list.
  190.  
  191.   10. Save your settings.  From the IDE press ALT-O, then press S.
  192.  
  193.  
  194.  
  195.   r e l e a s e   s c h e d u l e                                   /RELEASE
  196.   ──────────────────────────────────────────────────────────────────────────
  197.  
  198.   Updates to Concerto are released on the New Moon of each month.  We
  199.   are constantly optimizing code, fixing bugs, and adding new features.
  200.  
  201.  
  202.                      Release Date     Version   Archive Name
  203.     --------------------------------------------------------
  204.     Wide Beta #3     15th Jul 1996     960715     CDDK9607
  205.     Wide Beta #4     14th Aug 1996     960814     CDDK9608
  206.     Wide Beta #5     12th Sep 1996     960912     CDDK9609                                     
  207.     Wide Beta #6     12th Oct 1996     961012     CDDK9610               
  208.     Wide Beta #7     11th Nov 1996     961111     CDDK9611                   
  209.     Wide Beta #8     10th Dec 1996     961210     CDDK9612
  210.  
  211.  
  212.   You are currently using Wide Beta #2 (version 960616).  This version
  213.   was released on Sunday, June 16th, 1996.  Refer to SUPPORT.DOC if a
  214.   newer version is available.
  215.  
  216.  
  217.  
  218.   ▀▀▀▀▀▀\   
  219.       ▀▀\   Aspects of Concerto Doors
  220.   ▀▀▀▀▀▀\
  221.       ▀▀\   Please run the tutorial series before reading this section.
  222.   ▀▀▀▀▀▀\
  223.  
  224.  
  225.   s c r i p t s                                                     /SCRIPTS
  226.   ──────────────────────────────────────────────────────────────────────────
  227.  
  228.   1. Overview
  229.  
  230.      The built-in script interpreter manages the set of functions and
  231.      variables accessible to the sysop.  Its tasks include token parsing,
  232.      variable assignments and conversion of data types.
  233.  
  234.      Scripts are totally free-form: More than one command may exist on a
  235.      single line, and parameters can extend across multiple lines.  Line
  236.      feeds, tabs, and other whitespace characters are all handled gracefully.
  237.  
  238.  
  239.   2. Comments
  240.  
  241.      A semicolon forces the interpreter to ignore the rest of the text on
  242.      the current line.  This is an excellent way of placing comments in a
  243.      script.
  244.  
  245.  
  246.   3. Identifiers
  247.  
  248.      An IDENTIFIER is a word or string that refers to a variable or function.
  249.  
  250.        ■ Identifiers are not case-sensitive.
  251.        ■ There is no limit to the length of an identifier.
  252.        ■ Spaces are allowed if double-quotes are used.
  253.        ■ Numbers, underscores and other special characters are legal.
  254.  
  255.      Example:  ClrScr
  256.      Example:  ComPort
  257.      Example:  "My Var"
  258.      Example:  _Cheese!
  259.  
  260.  
  261.   4. Functions
  262.  
  263.      A function performs a task, such as clearing the screen or creating
  264.      a subdirectory.  Functions can accept any number of parameters.
  265.  
  266.      Example:  Write "Hello World!"
  267.      Example:  Color 7
  268.      Example:  ClrScr
  269.  
  270.  
  271.   5. Variables
  272.  
  273.      A variable contains a piece of information, such as the communications
  274.      port or the name of the BBS.  Modifying a variable is much like QBASIC:
  275.  
  276.      LET Variable = Value
  277.       │   │       │  └──── A value to copy into the variable.
  278.       │   │       └─────── Assignment operator (optional)
  279.       │   └─────────────── Variable name
  280.       └─────────────────── LET Keyword (optional)
  281.  
  282.  
  283.  
  284.   6. Registration
  285.  
  286.      The question arises: Where do all of these functions and variables
  287.      come from?  How does Concerto know that "ComPort" refers to
  288.      the communications port used by the FOSSIL driver?
  289.  
  290.      Answer: Registration
  291.  
  292.      A registration procedure associates an identifier with a particular
  293.      variable in your program.  Once registered, the sysop can modify
  294.      the variable in a script or display its contents in a string or
  295.      text file (refer to the MACROS section for details).
  296.  
  297.        RegisterByte('TextAttr', @TextAttr);
  298.        RegisterWord('ComPort',  @ComPort);
  299.          │            │         │
  300.          │            │         └─ The address of the variable in your
  301.          │            │            program.
  302.          │            │
  303.          │            └─────────── An identifier (see part 3 above).    
  304.          │
  305.          └──────────────────────── The registration procedure.  ALWAYS USE
  306.                                    THE CORRECT REGISTRATION PROCEDURE.
  307.                                    Otherwise, you will experience memory
  308.                                    corruption!  The TYPES.PAS unit provides
  309.                                    a variety of registration procedures
  310.                                    for your use.
  311.  
  312.      Remember, use RegisterByte to register a byte, RegisterWord to
  313.      register a word, and so on.  These procedures are in the TYPES unit.
  314.  
  315.  
  316.   7. RegisterConcerto
  317.  
  318.      The RegisterConcerto procedure (CONCERTO.PAS) registers all of the
  319.      Concerto functions and variables with the interpreter.  It also
  320.      registers many SYSTEM and CRT variables, including DirectVideo and
  321.      CheckSnow.  Always call RegisterConcerto as soon as possible in
  322.      your program, and always before executing the initialization script.
  323.  
  324.        BEGIN
  325.        RegisterConcerto;
  326.        Script('Init');
  327.         :
  328.         :
  329.        END;
  330.  
  331.  
  332.   9. The Initialization Script
  333.  
  334.      The initialization script (INIT.SCR) is the DNA of the program.
  335.      It controls all aspects of the door's configuration -- everything
  336.      from the random-number generator to the activation of the FOSSIL
  337.      driver.  As shown above, always call RegisterConcerto before running
  338.      the script.
  339.  
  340.  
  341.  
  342.   m a c r o s                                                        /MACROS
  343.   ──────────────────────────────────────────────────────────────────────────
  344.  
  345.   A variable can be imbedded in a text file or string:
  346.  
  347.         {Variable}
  348.         │ │      └─ Right delimiter
  349.         │ └──────── Variable name
  350.         └────────── Left delimiter
  351.  
  352.   This is called a macro.  Concerto will extract the variable name,
  353.   obtain its contents, then display the results on the screen.
  354.  
  355.         Example:  "Hello, {UserFirst}!"   ->   "Hello, Kelly!"
  356.         Example:  "COM{ComPort}:"         ->   "COM1:"
  357.  
  358.   Formatting the result to a certain length is easy:
  359.  
  360.         {Variable:Size}
  361.                  │ └──── Size
  362.                  └────── Colon
  363.      
  364.   The result will be padded or clipped to insure the desired length.
  365.   By default, the result will be right-justified.  Place a negative
  366.   sign in front of the size to force left-justification:
  367.  
  368.         {Variable:-Size}
  369.                   └────── Negative sign to force left-justication
  370.  
  371.  
  372.   Examples: (UserName="Sleeping Beauty")
  373.  
  374.     Hello {UserName}!        -->        Hello Sleeping Beauty!
  375.     Hello {UserName:10}!     -->        Hello Sleeping B!
  376.     Hello {UserName:20}!     -->        Hello Sleeping Beauty      !
  377.     Hello {UserName:-20}!    -->        Hello       Sleeping Beauty!
  378.  
  379.  
  380.   c o m m a n d - l i n e   p a r a m e t e r s                      /PARAMS
  381.   ──────────────────────────────────────────────────────────────────────────
  382.  
  383.   Command-line parameters are defined in INIT.SCR:
  384.  
  385.     GetParam B, Baud
  386.     GetParam C, ComPort
  387.     GetParam N, Node
  388.     GetParam O, Locked
  389.     GetParam P, DropFile
  390.      │       │   │
  391.      │       │   └─────────── Script variable 
  392.      │       └─────────────── Flag character
  393.      └─────────────────────── Script command
  394.  
  395.  
  396.   Here is a typical script after a sysop's modifications:
  397.  
  398.     >  ;modications made when installed last december
  399.     >  ;GetParam O, Locked  ;comment-out this line
  400.     >  GetParam L, Locked   ;merely changed the flag char to L
  401.     >  GetParam S, Security ;added this line cause i'm not using a dropfile
  402.  
  403.   Parameters must start with a dash (-) or a forward slash (/).  The
  404.   flag character is not case-sensitive.  A space may exist between the
  405.   flag character and its data.  Here are a few valid command lines:
  406.  
  407.     Example: GAME.EXE /C 1             <-- Notice the space.
  408.     Example: GAME.EXE -s30             <-- No space here.
  409.     Example: GAME.EXE -n1 -O38400      <-- Upper and lower-case flag chars.
  410.     Example: GAME.EXE -b300 /c1        <-- Slash or dash
  411.  
  412.  
  413.  
  414.   c o l o r s                                                        /COLORS
  415.   ──────────────────────────────────────────────────────────────────────────
  416.  
  417.   A color system is a protocol (or standard) for specifying a certain color.
  418.   Some color systems (like ANSI and AVATAR) provide additional services.
  419.   Most protocols, however, simply make it easy to change the current color.
  420.  
  421.   All protocols have one thing in common: The Flag Character.  The flag
  422.   char is the character that tells the computer that a color change
  423.   is about to occur.  ANSI, for example, uses the escape character (#27).
  424.   AVATAR uses a control-v.
  425.  
  426.   When Concerto encounters a flag char, it diverts the stream of outbound
  427.   characters to the driver handling that particular protocol.  The driver
  428.   examines the characters, takes appropriate action, and returns control
  429.   to Concerto.
  430.  
  431.   We've provided support for ANSI, AVATAR, HexPipe, LORD, RemoteAccess,
  432.   PCBoard and WildCat.  The specifications for these protocols are
  433.   described in SYSOP.DOC.  These protocols are installed by the
  434.   RegisterConcerto procedure.  
  435.  
  436.  
  437.  
  438.   g e t t i n g   s t a r t e d                                       /START
  439.   ──────────────────────────────────────────────────────────────────────────
  440.  
  441.   We've already done the following for you:
  442.  
  443.     a. Drawn all external ANSI files used by Concerto.  An example is
  444.        TIMEOUT.ANS, which is displayed when the caller falls asleep.
  445.  
  446.     b. Provided a script library with documentation.  You do not have to
  447.        worry about making the COMPORT variable accessible to the sysop.
  448.        Everything is documented in SYSOP.DOC -- which you can bundle with
  449.        your doors royalty-free.
  450.  
  451.     c. Wrote a standard initialization script with lots of comments.
  452.        This script will work with 99% of all systems and 99% of all doors.
  453.  
  454.   These files are located in the FREE archive.  You should do the following
  455.   when starting a new door:
  456.  
  457.     1. Make a separate directory for the door (ie C:\TP\MYGAME).
  458.     2. Copy the contents of archive to this directory.
  459.     3. Rename TEMPLATE.PAS to the name of your program.
  460.     4. Run TURBO.EXE or TPX.EXE from the directory.
  461.  
  462.   Follow these steps and you can begin development of your game immediately.
  463.  
  464.  
  465.  
  466.   ▀▀\ ▀▀\
  467.   ▀▀\ ▀▀\  Programmer's Reference Guide
  468.   ▀▀▀▀▀▀\
  469.       ▀▀\
  470.       ▀▀\
  471.  
  472.   u n i t s                                                           /UNITS
  473.   ──────────────────────────────────────────────────────────────────────────
  474.  
  475.   ╔══════════╤═════════════════════════════════════════════════╗
  476.   ║ DMenus   │ Simple menu system for door games.              ║
  477.   ║ Errata   │ Run-time error handler.                         ║
  478.   ║ XDOS     │ Extended DOS support unit.                      ║
  479.   ║ FOSSIL   │ Fido/Opus/SeaDOG Interface Layer support unit.  ║
  480.   ║ RA       │ RemoteAccess BBS support unit.                  ║
  481.   ║ XStrings │ Extended pChar/TPString unit.                   ║
  482.   ║ IO       │ Input/Output engine.                            ║
  483.   ║ LORD     │ Legend of the Red Dragon support unit.          ║
  484.   ║ Scripts  │ Script interpreter.                             ║
  485.   ║ Concerto │ Concerto Door Development Kit (central unit).   ║
  486.   ║ Win95    │ Windows 3.x and Windows 95 support unit.        ║
  487.   ║ Math     │ Mathematics routines.                           ║
  488.   ║ Reboot   │ Rebooting routines.                             ║
  489.   ║ Types    │ Variable types for the script interpreter.      ║
  490.   ║ Video    │ Variety of CGA, EGA and VGA video routines.     ║
  491.   ║ Slicer   │ Time-slicing unit.                              ║
  492.   ║ Sounds   │ IBM PC speaker sound effects.                   ║
  493.   ║ Keyboard │ Keyboard support unit.                          ║
  494.   ╚══════════╧═════════════════════════════════════════════════╝
  495.  
  496.  
  497.  
  498.   g l o b a l   v a r i a b l e s                                    /GLOBAL
  499.   ──────────────────────────────────────────────────────────────────────────
  500.  
  501.   Concerto uses over 100 global variables.  It is unlikely, however,
  502.   that you'll use more than 10% of them.  Most of them are for tweaking
  503.   purposes only.
  504.  
  505.   BBS information is stored in a tBBS record (CONCERTO.TPU):
  506.  
  507.     BBS : tBBS = (
  508.       Name       : pChar = NIL;
  509.       SysopFirst : pChar = NIL;
  510.       SysopLast  : pChar = NIL );
  511.  
  512.  
  513.   The chat-mode configuration is stored in a tChatCfg record (CONCERTO.TPU):
  514.  
  515.     ChatCfg : tChatCfg = (
  516.       ExecPrompt  : pChar   = NIL;
  517.       Flags       : Word    = 0;
  518.       Greeting    : pChar   = NIL;
  519.       Goodbye     : pChar   = NIL;
  520.       RemoteExit  : Boolean = False;
  521.       SysopColors : tColorScheme =
  522.                       ( Lower:03; Upper:03; Digit:03; HiBit:03; Punct:03 );
  523.       UserColors  : tColorScheme =
  524.                       ( Lower:07; Upper:07; Digit:07; HiBit:07; Punct:07 ));
  525.  
  526.  
  527.   Most communications information is stored in CONCERTO.TPU:
  528.  
  529.     Baud           : LongInt = 0;
  530.     CarrierDropped : Boolean = False;
  531.     DropFile       : pChar   = NIL;
  532.     Locked         : LongInt = 0;
  533.     Node           : LongInt = 0;
  534.  
  535.  
  536.   Software information is stored in a tSoftware record (CONCERTO.TPU):
  537.  
  538.     Software : tSoftware =
  539.       Application : pChar     = NIL;
  540.       Author      : pChar     = NIL;
  541.       Build       : STRING[6] = '960616';
  542.       Company     : pChar     = NIL;
  543.       Copyright   : pChar     = NIL;
  544.       Version     : pChar     = NIL );
  545.  
  546.  
  547.   User-related variables are stored in a tUser record (CONCERTO.TPU):
  548.  
  549.     User : tUser = (
  550.       Expert     : Boolean = False;
  551.       FirstName  : pChar   = NIL;
  552.       LastName   : pChar   = NIL;
  553.       Location   : pChar   = NIL;
  554.       Password   : pChar   = NIL;
  555.       PhoneData  : pChar   = NIL;
  556.       PhoneFax   : pChar   = NIL;
  557.       PhoneVoice : pChar   = NIL;
  558.       Security   : LongInt = 0);
  559.  
  560.  
  561.   Doors using the LORD unit (Legend of the Red Dragon support) can
  562.   access several pChars containing paths to the various LORD files:
  563.  
  564.     LORDDirectory : pChar = NIL;
  565.  
  566.     LORD_3rdParty : pChar = NIL;  { 3RDPARTY .DAT }
  567.     LORD_BadSay   : pChar = NIL;  { BADSAY   .DAT }
  568.     LORD_Config   : pChar = NIL;  { LORD     .DAT }
  569.     LORD_GoodSay  : pChar = NIL;  { GOODSAY  .DAT }
  570.     LORD_LEnemy   : pChar = NIL;  { LENEMY   .DAT }
  571.     LORD_LockOut  : pChar = NIL;  { LOCKOUT  .DAT }
  572.     LORD_NormSay  : pChar = NIL;  { NORMSAY  .DAT }
  573.     LORD_Player   : pChar = NIL;  { PLAYER   .DAT }
  574.     LORD_RIP      : pChar = NIL;  { LORDRIP  .DAT }
  575.     LORD_Text     : pChar = NIL;  { LORDTXT  .DAT }
  576.  
  577.  
  578.   The remaining variables are scattered across the units.  Here are
  579.   the most important ones:
  580.  
  581.     LastChar    : Char  = #0;  (IO)         Last character processed.
  582.     LastPrinted : Char  = #0;  (IO)         Last character actually printed.
  583.     TextAttr    : Byte  = 0;   (IO)         Current text color.
  584.     TextDir     : pChar = NIL; (IO)         Location of text files.
  585.     TimeLeft    : Word  = 60;  (IO)         Number of minutes left.
  586.     TimeOut     : Word  = 180; (IO)         Number of seconds before timeout.
  587.     ScanCode    : Word  = 0;   (Keyboard)   Scancode of last local keystroke.
  588.     ScriptDir   : pChar = NIL; (Scripts)    Location of script files.
  589.  
  590.  
  591.   Go to the most appropriate unit when looking for a variable or constant.
  592.   For example, suppose that you are curious about the buffer used when
  593.   loading ANSI/AVATAR files.  A scan through IO.PAS will reveal the
  594.   variable TextBufSize, which specifies the size of the buffer when
  595.   loading text files for display.
  596.  
  597.   The RegisterConcerto procedure creates script-variable equivilants of
  598.   many global variables -- including variables in some of the Borland
  599.   units (CRT, SYSTEM, etc).  Scan SYSOP.DOC or CONCERTO.PAS for details.
  600.  
  601.  
  602.   f o r m a t                                                        /FORMAT
  603.   ──────────────────────────────────────────────────────────────────────────
  604.  
  605.   Name (Unit)
  606.  
  607.     PURPOSE  : The purpose of this function or procedure.
  608.  
  609.     NOTES    : Important nodes, more details, warnings, etc.
  610.  
  611.     EXAMPLE  : Example code that uses this function or procecure.
  612.  
  613.     SEE ALSO : Other functions or procedures that you may wish to examine.
  614.  
  615.  
  616.  
  617.   l i b r a r y                                                     /LIBRARY
  618.   ──────────────────────────────────────────────────────────────────────────
  619.  
  620. PROCEDURE ActivateAll; (IO)
  621.  
  622.   PURPOSE  : Activates every I/O driver.
  623.  
  624.   NOTES    : This procedure is generally used after you have temporarily
  625.              suspended one or more of the drivers (such as when displaying a
  626.              sysop-only screen).
  627.  
  628.   EXAMPLE  : PROCEDURE PrivateMessageToCaller(p:pIODriverRemote; Msg:pChar);
  629.                BEGIN
  630.                DeactivateAllExceptPtr(p);
  631.                SO_pCharLn(Msg);
  632.                ActivateAll;
  633.                END;
  634.  
  635.   SEE ALSO : DeactivateAllExceptPtr
  636.  
  637.  
  638.  
  639. FUNCTION AddSysKey(Code:Word; Source:pChar):Boolean; (Concerto)
  640.  
  641.   PURPOSE  : Associates a scan code with a string of commands.
  642.  
  643.   NOTES    : Concerto will compare each local keystroke with the list of
  644.              scan codes registered with this function.  The commands
  645.              are executed if a match is found.  A list of common scan
  646.              codes can be found in SYSOP.DOC and KEYBOARD.INT.
  647.  
  648.   EXAMPLE  : BEGIN
  649.              WriteLn('WARNING: The initialization file was not found!');
  650.              WriteLn('         The program will use default values.');
  651.  
  652.              AddSysKey(KB_Alt_C,'Chat');
  653.              AddSysKey(KB_Alt_H,'HangUp Exit 0');
  654.              AddSysKey(KB_Alt_X,'Exit 0');
  655.                :
  656.               etc
  657.                :
  658.              END;
  659.  
  660.  
  661.  
  662. FUNCTION AllDigits(p:pChar):Boolean; (XStrings)
  663.  
  664.   PURPOSE  : Returns TRUE if the all of the characters are digits.
  665.  
  666.   NOTES    : This function is merely a wrapper for AllInSet.
  667.  
  668.   SEE ALSO : AllInSet, CountDigits
  669.  
  670.  
  671.  
  672. FUNCTION AllInSet(p:pChar; List:CharSet):Boolean; (XStrings)
  673.  
  674.   PURPOSE  : Returns TRUE if all of the characters in the string
  675.              are in the given character set.
  676.  
  677.   SEE ALSO : AllDigits
  678.  
  679.  
  680.  
  681. PROCEDURE Allocate_CRC16_Table(VAR p:pCRC16_Table); (XStrings)
  682.  
  683.   PURPOSE  : Generates a 16-bit CRC table for future calculations.
  684.  
  685.   SEE ALSO : Allocate_CRC32_Table
  686.  
  687.  
  688.  
  689. PROCEDURE Allocate_CRC32_Table(VAR p:pCRC32_Table); (XStrings)
  690.  
  691.   PURPOSE  : Generates a 32-bit CRC table for future calculations.
  692.  
  693.   SEE ALSO : Allocate_CRC16_Table
  694.  
  695.  
  696.  
  697. FUNCTION ANSI_SYS_Driver:Boolean; (Video)
  698.  
  699.   PURPOSE  : Returns TRUE is ANSI.SYS is loaded on the local machine.
  700.  
  701.  
  702.  
  703. FUNCTION AppendChr(p:pChar; c:Char):pChar; (XStrings)
  704.  
  705.   PURPOSE  : Appends a character to a string.
  706.  
  707.   NOTES    : No range checking is performed.
  708.  
  709.  
  710.  
  711. FUNCTION AppendSlash(p:pChar):pChar; (XDOS)
  712.  
  713.   PURPOSE  : Appends a slash to the directory name.
  714.  
  715.   NOTES    : A slash is not appended if the string is empty.  An empty
  716.              directory path generally implies the current directory, not
  717.              the root directory.
  718.  
  719.  
  720.  
  721. FUNCTION Area_Circle(CONST Radius:Float):Float; (Math)
  722.  
  723.   PURPOSE  : Calculates the area of a circle with the specified radius.
  724.  
  725.   NOTES    : Area = πr²
  726.  
  727.   SEE ALSO : Area_Ellipse, Area_Equilateral_Triangle, Area_Rectangle,
  728.              Area_Sector, Area_Square, Area_Trapezoid, Area_Triangle
  729.  
  730.  
  731.  
  732. FUNCTION Area_Ellipse(CONST R1,R2:Float):Float; (Math)
  733.  
  734.   PURPOSE  : Calculates the area of an ellipse with the specified focal
  735.              points.
  736.  
  737.   SEE ALSO : Area_Circle, Area_Equilateral_Triangle, Area_Rectangle,
  738.              Area_Sector, Area_Square, Area_Trapezoid, Area_Triangle
  739.  
  740.  
  741.  
  742. FUNCTION Area_Equilateral_Triangle(CONST S:Float):Float; (Math)
  743.  
  744.   PURPOSE  : Calculates the area of an equilateral triangle with the
  745.              given side length.
  746.  
  747.  
  748.                         √ 3
  749.   NOTES    :     Area = ─── S²
  750.                          4
  751.  
  752.   SEE ALSO : Area_Circle, Area_Ellipse, Area_Rectangle, Area_Sector,
  753.              Area_Square, Area_Trapezoid, Area_Triangle
  754.  
  755.  
  756.  
  757. FUNCTION Area_Rectangle(CONST X,Y:Float):Float; (Math)
  758.  
  759.   PURPOSE  : Calculates the area of a rectangle with the specified side
  760.              lengths.
  761.  
  762.   SEE ALSO : Area_Circle, Area_Ellipse, Area_Equilateral_Triangle,
  763.              Area_Sector, Area_Square, Area_Trapezoid, Area_Triangle
  764.  
  765.  
  766.  
  767. FUNCTION Area_Sector(CONST Radius, Angle:Float):Float; (Math)
  768.  
  769.   PURPOSE  : Calculates the area of a sector with the specified radius
  770.              and angle.
  771.  
  772.   SEE ALSO : Area_Circle, Area_Ellipse, Area_Equilateral_Triangle,
  773.              Area_Rectangle, Area_Square, Area_Trapezoid, Area_Triangle
  774.  
  775.  
  776.  
  777. FUNCTION Area_Square(CONST Side:Float):Float; (Math)
  778.  
  779.   PURPOSE  : Calculates the area of a square with the specified side length.
  780.  
  781.   NOTES    : Area = S²
  782.  
  783.   SEE ALSO : Area_Circle, Area_Ellipse, Area_Equilateral_Triangle,
  784.              Area_Rectangle, Area_Sector, Area_Trapezoid, Area_Triangle
  785.  
  786.  
  787.  
  788. FUNCTION Area_Trapezoid(CONST A,B,H:Float):Float; (Math)
  789.  
  790.   PURPOSE  : Calculates the area of a trapezoid with the specified
  791.              top, base and height.
  792.  
  793.   SEE ALSO : Area_Circle, Area_Ellipse, Area_Equilateral_Triangle,
  794.              Area_Rectangle, Area_Sector, Area_Square, Area_Triangle
  795.  
  796.  
  797.  
  798. FUNCTION Area_Triangle(CONST Base,Height:Float):Float; (Math)
  799.  
  800.   PURPOSE  : Calculates the area of a triangle with the specified base
  801.              and height lengths.
  802.  
  803.   NOTES    : Area = ½BH
  804.  
  805.   SEE ALSO : Area_Circle, Area_Ellipse, Area_Equilateral_Triangle,
  806.              Area_Rectangle, Area_Sector, Area_Square, Area_Triangle
  807.  
  808.  
  809.  
  810. FUNCTION Calculate_CRC16(p:pChar):Word; (XStrings)
  811.  
  812.   PURPOSE  : Calculates the 16-bit CRC of the string.
  813.  
  814.   SEE ALSO : Calculate_CRC16I, Calculate_CRC32, Calculate_CRC32I
  815.  
  816.  
  817.  
  818. FUNCTION Calculate_CRC16I (p:pChar):Word; (XStrings)
  819.  
  820.   PURPOSE  : Calculates the 16-bit CRC of the string without
  821.              case-sensitivity.
  822.  
  823.   SEE ALSO : Calculate_CRC16, Calculate_CRC32, Calculate_CRC32I
  824.  
  825.  
  826.  
  827. FUNCTION Calculate_CRC32  (p:pChar):LongInt; (XStrings)
  828.  
  829.   PURPOSE  : Calculates the 32-bit CRC of the string.
  830.  
  831.   SEE ALSO : Calculate_CRC16, Calculate_CRC16I, Calculate_CRC32I
  832.  
  833.  
  834.  
  835. FUNCTION Calculate_CRC32I (p:pChar):LongInt; (XStrings)
  836.  
  837.   PURPOSE  : Calculates the 32-bit CRC of the string without
  838.              case-sensitivity.
  839.  
  840.   SEE ALSO : Calculate_CRC16, Calculate_CRC16I, Calculate_CRC32
  841.  
  842.  
  843.  
  844. PROCEDURE Capitalize(VAR s:OpenString); (XStrings)
  845.  
  846.   PURPOSE  : Capitalizes a Turbo Pascal string.
  847.  
  848.  
  849.  
  850. PROCEDURE ChangeDirectory(Dir:pChar); (XDOS)
  851.  
  852.   PURPOSE  : Changes to the specified directory.
  853.  
  854.   NOTES    : The result is saved in DOSError.
  855.  
  856.  
  857.  
  858. PROCEDURE ChangeDrive(Drive:Byte); (XDOS)
  859.  
  860.   PURPOSE  : Changes to the specified drive.
  861.  
  862.   NOTES    : 1 = Drive A
  863.              2 = Drive B
  864.              3 = Drive C
  865.              4 = Drive D
  866.              etc...
  867.  
  868.   SEE ALSO : CurrentDrive
  869.  
  870.  
  871.  
  872. FUNCTION Char_pChar(p:pChar; c:Char):pChar; (XStrings)
  873.  
  874.   PURPOSE  : Converts a character to a string.
  875.  
  876.   NOTES    : The destination must have enough room to hold the character
  877.              and the terminating null-zero.
  878.  
  879.  
  880.  
  881. PROCEDURE CheckLocalMode; (Concerto)
  882.  
  883.   PURPOSE  : Prompts the sysop for his first and last name if the door
  884.              is operating independently of a BBS system.
  885.  
  886.   NOTES    : The user will not be prompted if any of the following is true:
  887.  
  888.                1. The door is running remotely.
  889.                2. A drop file has been specified.
  890.                3. User.FirstName is not NIL.
  891.                4. User.LastName is not NIL.
  892.  
  893.              If executed, the file LOCAL.ANS is displayed to the caller.
  894.  
  895.  
  896.  
  897. FUNCTION Circum_Circle(CONST R:Float):Float; (Math)
  898.  
  899.   PURPOSE  : Calculates the circumference of a circle with the given radius.
  900.  
  901.   SEE ALSO : Circum_Ellipse
  902.  
  903.  
  904.  
  905. FUNCTION Circum_Ellipse(CONST R1,R2:Float):Float; (Math)
  906.  
  907.   PURPOSE  : Calculates the circumference of an ellipse with the given
  908.              major and minor radii.
  909.  
  910.   SEE ALSO : Circum_Circle
  911.  
  912.  
  913.  
  914. FUNCTION Clip(p:pChar; SetSize:Integer; Filler:Char):pChar; (XStrings)
  915.  
  916.   PURPOSE  : Clips or pads the string to a given size.
  917.  
  918.   NOTES    : ■ SetSize < 0 : The string is left-justified.
  919.              ■ SetSize > 0 : The string is right-justified.
  920.              ■ SetSize = 0 : NOP (no operation).
  921.  
  922.              The string length cannot exceed 32767 characters.
  923.  
  924.   SEE ALSO : Delete
  925.  
  926.  
  927.  
  928. PROCEDURE CloseClipboard; (Win95)
  929.  
  930.   PURPOSE  : Closes the Windows clipboard.
  931.  
  932.   EXAMPLE  : PROCEDURE WriteFirstNameToClipBoard;
  933.                BEGIN
  934.                OpenClipboard;
  935.                SetClipBoardDate(User.FirstName);
  936.                CloseClipboard;
  937.                END;
  938.  
  939.   SEE ALSO : EmptyClipboard, OpenClipboard
  940.  
  941.  
  942.  
  943. PROCEDURE ColdReboot; (Reboot)
  944.  
  945.   PURPOSE  : Invokes a cold reboot.
  946.  
  947.   NOTES    : A cold reboot is the same as a full reset of the computer
  948.              computer system.  Compare this to the warm reboot, which
  949.              generally skips the initial memory test.
  950.  
  951.   EXAMPLE  : BEGIN
  952.              SO_pCharLn('Please prepare for a system reboot.');
  953.              IF SI_Boolean('Skip initial memory test? ',False) THEN
  954.                WarmReboot
  955.              ELSE
  956.                ColdReboot;
  957.              END;
  958.  
  959.   SEE ALSO : RebootComputer, HardwareReset, WarmReboot
  960.  
  961.  
  962.  
  963. FUNCTION CorrectPathName(Dest,Raw,Dir,Ext:pChar):pChar; (XDOS)
  964.  
  965.   PURPOSE  : Generates a string with the proper directory and extension.
  966.  
  967.   PARAMS   : Dest     Destination string.
  968.              Raw      Filespec to process.
  969.              Dir      Default directory is one was not specified.
  970.              Ext      Default extension is one was not specified.
  971.  
  972.   NOTES    : No range checking is performed.
  973.  
  974.  
  975.  
  976. FUNCTION COSH(CONST R:Float):Float; (Math)
  977.  
  978.   PURPOSE  : Calculates the hyperbolic cosine of the argument.
  979.  
  980.   SEE ALSO : COTH, SECH, SINH, TANH
  981.  
  982.  
  983.  
  984. FUNCTION COT(CONST R:Float):Float; (Math)
  985.  
  986.   PURPOSE  : Calculates the cotangent of the argument.
  987.  
  988.   SEE ALSO : CSC, SEC, TAN
  989.  
  990.  
  991.  
  992. FUNCTION COTH(CONST R:Float):Float; (Math)
  993.  
  994.   PURPOSE  : Calculates the hyperbolic cotangent of the argument.
  995.  
  996.   SEE ALSO : COSH, SECH, SINH, TANH
  997.  
  998.  
  999.  
  1000. FUNCTION CountDigits(n:LongInt):Byte; (XStrings)
  1001.  
  1002.   PURPOSE  : Returns the size of the string representation of the number,
  1003.              not including the positive or negative sign.
  1004.  
  1005.   SEE ALSO : AllDigits
  1006.  
  1007.  
  1008.  
  1009. FUNCTION CSC(CONST R:Float):Float; (Math)
  1010.  
  1011.   PURPOSE  : Calculates the cosecant of the argument.
  1012.  
  1013.   SEE ALSO : COT, SEC, TAN
  1014.  
  1015.  
  1016.  
  1017. FUNCTION CurrentDay:Byte; (XDOS)
  1018.  
  1019.   PURPOSE  : Returns the current day number of the month.
  1020.  
  1021.   SEE ALSO : CurrentMonth, CurrentWeekday, CurrentYear
  1022.  
  1023.  
  1024.  
  1025. FUNCTION CurrentDrive:Byte; (XDOS)
  1026.  
  1027.   PURPOSE  : Returns the current disk drive number (1=A, 2=B, 3=C, etc).
  1028.  
  1029.   SEE ALSO : ChangeDrive
  1030.  
  1031.  
  1032.  
  1033. FUNCTION CurrentHours:Byte; (XDOS)
  1034.  
  1035.   PURPOSE  : Returns the current hour.
  1036.  
  1037.   SEE ALSO : CurrentMinutes, CurrentSeconds, GetDate
  1038.  
  1039.  
  1040.  
  1041. FUNCTION CurrentMinutes:Byte; (XDOS)
  1042.  
  1043.   PURPOSE  : Returns the current number of minutes.
  1044.  
  1045.   SEE ALSO : CurrentHours, CurrentSeconds, GetDate
  1046.  
  1047.  
  1048.  
  1049. FUNCTION CurrentMonth:Byte; (XDOS)
  1050.  
  1051.   PURPOSE  : Returns the current month number (1-12).
  1052.  
  1053.   SEE ALSO : CurrentDay, CurrentWeekday, CurrentYear
  1054.  
  1055.  
  1056.  
  1057. FUNCTION CurrentSeconds:Byte; (XDOS)
  1058.  
  1059.   PURPOSE  : Returns the current number of seconds.
  1060.  
  1061.   SEE ALSO : CurrentHours, CurrentMinutes, GetDate
  1062.  
  1063.  
  1064.  
  1065. FUNCTION CurrentWeekday:Byte; (XDOS)
  1066.  
  1067.   PURPOSE  : Returns the current day of week (0-6).
  1068.  
  1069.   NOTES    : 0 = Sunday
  1070.              1 = Monday
  1071.              2 = Tuesday
  1072.              3 = Wednesday
  1073.              4 = Thursday
  1074.              5 = Friday
  1075.              6 = Saturday
  1076.  
  1077.   SEE ALSO : CurrentDay, CurrentMonth, CurrentYear
  1078.  
  1079.  
  1080.  
  1081. FUNCTION CurrentYear:Word; (XDOS)
  1082.  
  1083.   PURPOSE  : Returns the current year (1980-2099).
  1084.  
  1085.   SEE ALSO : CurrentDay, CurrentMonth, CurrentWeekday
  1086.  
  1087.  
  1088.  
  1089. PROCEDURE CursorOff; (Video)
  1090.  
  1091.   PURPOSE  : Disables the visibility of the cursor without affecting
  1092.              its attributes (i.e. size).  Very old BIOSs are supported.
  1093.  
  1094.   SEE ALSO : CursorOn, SetCursorShape
  1095.  
  1096.  
  1097.  
  1098. PROCEDURE CursorOn; (Video)
  1099.  
  1100.   PURPOSE  : Enables the visibility of the cursor without affecting
  1101.              its attributes (i.e. size).  Very old BIOSs are supported.
  1102.  
  1103.   SEE ALSO : CursorOff, SetCursorShape
  1104.  
  1105.  
  1106.  
  1107. FUNCTION DayExtension(p:pChar; Day:Byte):pChar; (XStrings)
  1108.  
  1109.   PURPOSE  : Returns the two-character extension of the day number.
  1110.  
  1111.   NOTES    : The destination must contain enough room to hold two
  1112.              characters.  The day number cannot exceed 31.  The result
  1113.              will be 'st', 'nd', 'rd' or 'th'.
  1114.  
  1115.  
  1116.  
  1117. PROCEDURE DeactivateAllExceptPtr(p:pIODriver); (IO)
  1118.  
  1119.   PURPOSE  : Deactivates a specific I/O driver.
  1120.  
  1121.   NOTES    : The driver is suspended, not deallocated.
  1122.  
  1123.   EXAMPLE  : PROCEDURE PrivateMessageToCaller(p:pIODriverRemote; Msg:pChar);
  1124.                BEGIN
  1125.                DeactivateAllExceptPtr(p);
  1126.                SO_pCharLn(Msg);
  1127.                ActivateAll;
  1128.                END;
  1129.  
  1130.   SEE ALSO : ActivateAll
  1131.  
  1132.  
  1133.  
  1134. FUNCTION DecTimeLeft(n:Word):Word; (IO)
  1135.  
  1136.   PURPOSE  : Decreases the number of minutes remaining in the session.
  1137.  
  1138.   SEE ALSO : IncTimeLeft
  1139.  
  1140.  
  1141.  
  1142. FUNCTION DefaultExtension(Path,DefExt:pChar):pChar; (XDOS)
  1143.  
  1144.   PURPOSE  : Ensures that the specified file has the proper extension.
  1145.  
  1146.  
  1147.  
  1148. PROCEDURE DefaultNoTimeProcedure; (Concerto)
  1149.  
  1150.   PURPOSE  : Convenience.  Use this procedure if you do not wish to
  1151.              write your own no-time-left procedure.
  1152.  
  1153.   NOTES    : The file EXCEEDED is displayed before terminating the call.
  1154.              Add the following to your main program:
  1155.  
  1156.              SetNoTimeProcedure(@DefaultNoTimeProcedure);
  1157.  
  1158.   SEE ALSO : SetNoTimeProcedure
  1159.  
  1160.  
  1161.  
  1162. PROCEDURE DefaultTimeOutProcedure; (Concerto)
  1163.  
  1164.   PURPOSE  : Convenience.  Use this procedure if you do not wish to
  1165.              write your own time-out procedure.
  1166.  
  1167.   NOTES    : The file TIMEOUT.ANS is displayed before terminating the
  1168.              call.  Add the following to your main program:
  1169.  
  1170.              SetTimeOutProcedure(@DefaultTimeOutProcedure)
  1171.  
  1172.   SEE ALSO : SetTimeOutProcedure
  1173.  
  1174.  
  1175.  
  1176. FUNCTION Deg_Grd (CONST D:Float) : Float; (Math)
  1177.  
  1178.   PURPOSE  : Converts degrees to gradians.
  1179.  
  1180.   SEE ALSO : Deg_Rad, Grd_Deg, Grd_Rad, Rad_Deg, Rad_Grd
  1181.  
  1182.  
  1183.  
  1184. FUNCTION Deg_Rad (CONST D:Float) : Float; (Math)
  1185.  
  1186.   PURPOSE  : Converts degrees to radians.
  1187.  
  1188.   SEE ALSO : Deg_Grd, Grd_Deg, Grd_Rad, Rad_Deg, Rad_Grd
  1189.  
  1190.  
  1191.  
  1192. PROCEDURE DeleteFile(Path:pChar); (XDOS)
  1193.  
  1194.   PURPOSE  : Deletes the specified file.
  1195.  
  1196.   NOTES    : The result is saved in DOSError.
  1197.  
  1198.  
  1199.  
  1200. PROCEDURE DeleteID(p:pChar); (Scripts)
  1201.  
  1202.   PURPOSE  : Deletes the identifier.
  1203.  
  1204.   NOTES    : The name of the identifier is not case-sensitive.
  1205.  
  1206.  
  1207.  
  1208. FUNCTION DesqView:Boolean; (Slicer)
  1209.  
  1210.   PURPOSE  : Returns TRUE if DesqView is installed, FALSE if not.
  1211.  
  1212.   SEE ALSO : DOSShell, DoubleDOS, OS2, TopView, Windows, Windows_Real
  1213.  
  1214.  
  1215.  
  1216. FUNCTION DesqView_Version:Word; (Slicer)
  1217.  
  1218.   PURPOSE  : Returns the version of DesqView.
  1219.  
  1220.   NOTES    : The major version is returned in the low byte; the minor
  1221.              version is returned in the high byte.  This function properly
  1222.              handles the version bug found in some early copies of
  1223.              DesqView 2.0.
  1224.  
  1225.   SEE ALSO : DOS_Version, DoubleDOS_Version, OS2_Version,
  1226.              TopView_Version, Windows_Version
  1227.  
  1228.  
  1229.  
  1230. FUNCTION DiskFree(Drive:Byte):LongInt; (XDOS)
  1231.  
  1232.   PURPOSE  : Returns the number of free bytes on the specified drive.
  1233.  
  1234.   NOTES    : 0=default, 1=A, 2=B, etc.  Returns -1 if an invalid drive
  1235.              was specified.
  1236.  
  1237.   SEE ALSO : DiskSize
  1238.  
  1239.  
  1240.  
  1241. FUNCTION DiskSize(Drive:Byte):LongInt; (XDOS)
  1242.  
  1243.   PURPOSE  : Returns the size in bytes of the specified drive.
  1244.  
  1245.   NOTES    : 0=default, 1=A, 2=B, etc.  Returns -1 if an invalid drive
  1246.              was specified.
  1247.  
  1248.   SEE ALSO : DiskFree
  1249.  
  1250.  
  1251.  
  1252. FUNCTION Distance(X1,Y1,X2,Y2:Float):Float; (Math)
  1253.  
  1254.   PURPOSE  : Calculates the distance between two points.
  1255.  
  1256.  
  1257.  
  1258. FUNCTION DoorSys_2_Graphics(p:pChar):Byte; (Video)
  1259.  
  1260.   PURPOSE  : Converts a DOOR.SYS graphics string to the system used by
  1261.              this unit.
  1262.  
  1263.   NOTES    : NG  =  0  (_ASCII)
  1264.              GR  =  1  (_ANSI)
  1265.  
  1266.  
  1267.  
  1268. FUNCTION DOSLocation:Word; (XDOS)
  1269.  
  1270.   PURPOSE  : Describes the location of DOS.
  1271.  
  1272.   NOTES    : Use the dmXXXX constants to determine the location of DOS.
  1273.  
  1274.   EXAMPLE  : BEGIN
  1275.  
  1276.              SO_pChar('RAM/ROM Check: ');
  1277.  
  1278.              IF (DOSLocation AND dmRAM) = dmRAM  THEN
  1279.                SO_pCharLn('DOS is located in RAM')
  1280.              ELSE
  1281.                IF (DOSLocation AND dmROM) = dmROM THEN
  1282.                  SO_pCharLn('DOS is located in ROM');
  1283.  
  1284.              SO_pChar('Hgh/Cnv Check: ');
  1285.  
  1286.              IF (DOSLocation AND dmConv) = dmConv THEN
  1287.                SO_pCharLn('DOS is located in conventional memory')
  1288.              ELSE
  1289.                IF (DOSLocation AND dmHigh) = dmHigh THEN
  1290.                  SO_pCharLn('DOS is located in high memory');
  1291.              END;
  1292.  
  1293.  
  1294.  
  1295. FUNCTION DOSShell:Boolean; (Slicer)
  1296.  
  1297.   PURPOSE  : Returns TRUE if the DOS 5+ task switcher is loaded.
  1298.  
  1299.   SEE ALSO : DesqView, DoubleDOS, OS2, TopView, Windows, Windows_Real
  1300.  
  1301.  
  1302.  
  1303. FUNCTION DOSVersion:Word; (XDOS)
  1304.  
  1305.   PURPOSE  : Returns the DOS version number.
  1306.  
  1307.   NOTES    : The low byte is the major version.  The high byte is the
  1308.              minor version.
  1309.  
  1310.  
  1311.  
  1312. PROCEDURE DOS_Release; (Slicer)
  1313.  
  1314.   PURPOSE  : Notifies DOS that the program is idle.
  1315.  
  1316.   SEE ALSO : Release, DoubleDOS_Release, TopView_Release, Windows_Release
  1317.  
  1318.  
  1319.  
  1320. FUNCTION DOS_Version:Word; (Slicer)
  1321.  
  1322.   PURPOSE  : Returns the version of DOS on the local computer.
  1323.  
  1324.   NOTES    : The major version is returned in the low byte; the minor
  1325.              version is returned in the high byte.
  1326.  
  1327.   SEE ALSO : DesqView_Version, DoubleDOS_Version, OS2_Version,
  1328.              TopView_Version, Windows_Version
  1329.  
  1330.  
  1331.  
  1332. FUNCTION DoubleDOS:Boolean; (Slicer)
  1333.  
  1334.   PURPOSE  : Returns TRUE is DoubleDOS is installed, FALSE if not.
  1335.  
  1336.   SEE ALSO : DesqView, DOSShell, OS2, TopView, Windows, Windows_Real
  1337.  
  1338.  
  1339.  
  1340. PROCEDURE DoubleDOS_CriticalBegin; (Slicer)
  1341.  
  1342.   PURPOSE  : Disables multitasking in DoubleDOS.
  1343.  
  1344.   SEE ALSO : DoubleDOS_CriticalEnd
  1345.  
  1346.  
  1347.  
  1348. PROCEDURE DoubleDOS_CriticalEnd; (Slicer)
  1349.  
  1350.   PURPOSE  : Enables multitasking in DoubleDOS.
  1351.  
  1352.   SEE ALSO : DoubleDOS_CriticalBegin
  1353.  
  1354.  
  1355.  
  1356. PROCEDURE DoubleDOS_Release; (Slicer)
  1357.  
  1358.   PURPOSE  : Releases a single 55 ms timeslice back to DoubleDOS
  1359.  
  1360.   SEE ALSO : Release, DOS_Release, TopView_Release, Windows_Release
  1361.  
  1362.  
  1363.  
  1364. FUNCTION DoubleDOS_Version:Word; (Slicer)
  1365.  
  1366.   PURPOSE  : This dummy function always returns 0.  Please contact
  1367.              the author if you have technical information on the
  1368.              DoubleDOS multitasker.
  1369.  
  1370.   SEE ALSO : DesqView_Version, DOS_Version, OS2_Version,
  1371.              TopView_Version, Windows_Version
  1372.  
  1373.  
  1374.  
  1375. FUNCTION EGA_BIOS:Boolean; (Video)
  1376.  
  1377.   PURPOSE  : Returns TRUE if an EGA-compatible BIOS is detected.
  1378.  
  1379.   SEE ALSO : VGA_Detected
  1380.  
  1381.  
  1382.  
  1383. PROCEDURE EmptyClipboard; (Win95)
  1384.  
  1385.   PURPOSE  : Empties the Windows clipboard.
  1386.  
  1387.   EXAMPLE  : BEGIN
  1388.              OpenClipboard
  1389.              EmptyClipboard
  1390.              CloseClipboard
  1391.              END;
  1392.  
  1393.   SEE ALSO : CloseClipboard, OpenClipboard
  1394.  
  1395.  
  1396.  
  1397. FUNCTION EnsureDOS7:Boolean; (Win95)
  1398.  
  1399.   PURPOSE  : Returns TRUE if the local operating system is MS-DOS 7.0
  1400.              (Windows 95) or later.  Returns FALSE for all earlier versions.
  1401.  
  1402.  
  1403.  
  1404. FUNCTION Execute(Source:pChar):Word; (Scripts)
  1405.  
  1406.   PURPOSE  : Interpreters the string of commands.
  1407.  
  1408.   SEE ALSO : Script
  1409.  
  1410.  
  1411.  
  1412. PROCEDURE ExitChatMode; (Concerto)
  1413.  
  1414.   PURPOSE  : Terminates the chat-mode, if active.
  1415.  
  1416.   NOTES    : You may also directly modify the ChatExit flag of the
  1417.              ChatFlags variable:
  1418.  
  1419.                  ChatCfg.Flags := (ChatCfg.Flags OR ChatExit);
  1420.  
  1421.              Or:
  1422.  
  1423.                  ASM
  1424.                  OR ChatCfg.Flags, ChatExit
  1425.                  END;
  1426.  
  1427.   SEE ALSO : LineChat
  1428.  
  1429.  
  1430.  
  1431. PROCEDURE ExitDoor(ErrorLevel:Byte); (Concerto)
  1432.  
  1433.   PURPOSE  : Exits the door with the specified error level.
  1434.  
  1435.   NOTES    : The connection is not terminated.  Use the HangUp function
  1436.              if you wish to drop carrier on the user.
  1437.  
  1438.   EXAMPLE  : BEGIN
  1439.              SO_pCharLn('Sysop! You have elected to return to the BBS.');
  1440.              IF SI_Boolean('Hang up on the caller? ',False) THEN
  1441.                HangUp;
  1442.              ExitDoor(0);
  1443.              END;
  1444.  
  1445.   SEE ALSO : HangUp
  1446.  
  1447.  
  1448.  
  1449. FUNCTION ExtractNames(p:pChar; VAR First,Last:pChar):pChar; (XStrings)
  1450.  
  1451.   PURPOSE  : Extracts the first and last names from a string.
  1452.  
  1453.   WARNING  : No error or range checking!  Do not use in uncontrolled
  1454.              enviroments or risk a system crash!
  1455.  
  1456.  
  1457.  
  1458. FUNCTION Factorial(N:LongInt):LongInt; (Math)
  1459.  
  1460.   PURPOSE  : Calculates the factorial of N (N!).
  1461.  
  1462.   NOTES    : This function does not use recursion; it is, however, limited
  1463.              by the capacity of a LongInt (MaxLongInt).
  1464.  
  1465.   SEE ALSO : nCr, nPr
  1466.  
  1467.  
  1468.  
  1469. PROCEDURE FadeIn(d:Word); (Video)
  1470.  
  1471.   PURPOSE  : Restores a previously faded screen (via FadeOut).
  1472.  
  1473.   NOTES    : An EGA/VGA graphics card is required.  This procedure works
  1474.              in text mode.
  1475.  
  1476.   SEE ALSO : FadeOut
  1477.  
  1478.  
  1479.  
  1480. PROCEDURE FadeOut(d:Word); (Video)
  1481.  
  1482.   PURPOSE  : Smoothly cycles the color palette to produce a smooth
  1483.              fade-out effect.
  1484.  
  1485.   NOTES    : An EGA/VGA graphics card is required.  This procedure works
  1486.              in text mode.  The fade will not be smooth if executed
  1487.              in a windowed-DOS box under many multitaskers.
  1488.  
  1489.   SEE ALSO : FadeIn
  1490.  
  1491.  
  1492.  
  1493. FUNCTION FileExist(Path:pChar):Boolean; (XDOS)
  1494.  
  1495.   PURPOSE  : Returns TRUE if the specified file actually exists.
  1496.  
  1497.  
  1498.  
  1499. FUNCTION FileSplit(Path, Dir, Name, Ext:pChar):Word; (XDOS)
  1500.  
  1501.   PURPOSE  : Splits the path into its three components.
  1502.  
  1503.   NOTES    : Use fcXXXX to analyze the results.
  1504.  
  1505.  
  1506.  
  1507. FUNCTION ForceFalse:Boolean; (Slicer)
  1508.  
  1509.   PURPOSE  : Always returns FALSE.
  1510.  
  1511.   SEE ALSO : ForceTrue, NullProc
  1512.  
  1513.  
  1514.  
  1515. FUNCTION ForceTrue:Boolean; (Slicer)
  1516.  
  1517.   PURPOSE  : Always returns TRUE.
  1518.  
  1519.   SEE ALSO : ForceFalse, NullProc
  1520.  
  1521.  
  1522.  
  1523. FUNCTION FormattedBaud(p:pChar; Baud:LongInt):pChar; (XStrings)
  1524.  
  1525.   PURPOSE  : Returns a formatted version of the baud rate.
  1526.  
  1527.   NOTES    : The destination must have enough room to retain 4 characters
  1528.              plus the terminating null-zero.
  1529.  
  1530.                Baud     Result           Baud     Result
  1531.              ────────────────────────────────────────────
  1532.                   0      Zero             300      Slow
  1533.                1200      1200            2400      2400
  1534.                4800      4800            7200      7200
  1535.                9600      9600           12000      12.0
  1536.               14400      14.4           16800      16.8
  1537.               19200      19.2           21600      21.6
  1538.               24000      24.0           26400      26.4
  1539.               28800      28.8           38400      38.4
  1540.               57600      57.6           64000      64.0
  1541.              Greater      c²
  1542.  
  1543.  
  1544.  
  1545. PROCEDURE FOSSIL_ANSI_Write(C:Char); (FOSSIL)
  1546.  
  1547.   PURPOSE  : Sends a character to the local screen in such a way that
  1548.              ANSI processing can occur (if available).
  1549.  
  1550.   NOTES    : Never call this procedure is DOS output cannot be used.
  1551.  
  1552.   SEE ALSO : FOSSIL_BIOS_Write
  1553.  
  1554.  
  1555.  
  1556. PROCEDURE FOSSIL_BIOS_Write(C:Char); (FOSSIL)
  1557.  
  1558.   PURPOSE  : Sends a character to the local screen using BIOS I/O routines.
  1559.  
  1560.   NOTES    : DOS I/O is not used.
  1561.  
  1562.   SEE ALSO : FOSSIL_ANSI_Write
  1563.  
  1564.  
  1565.  
  1566. FUNCTION FOSSIL_Block_Write(FOSSIL_Port, Bytes:Word; Data:Pointer):Word; (FOSSIL)
  1567.  
  1568.   PURPOSE  : Copies data from your buffer to the outbound buffer.
  1569.  
  1570.   NOTES    : This function is substantially faster than a
  1571.              series of FOSSIL_Xmit_Chr calls.
  1572.  
  1573.   SEE ALSO : FOSSIL_Xmit_Chr, FOSSIL_Xmit_Str
  1574.  
  1575.  
  1576.  
  1577. FUNCTION FOSSIL_Carrier_Detect(FOSSIL_Port:Word):Boolean; (FOSSIL)
  1578.  
  1579.   PURPOSE  : Returns TRUE if a caller is online; FALSE if not.
  1580.  
  1581.  
  1582.  
  1583. FUNCTION FOSSIL_Char_Waiting(FOSSIL_Port:Word):Boolean; (FOSSIL)
  1584.  
  1585.   PURPOSE  : Returns TRUE if a character is waiting in the inbound buffer.
  1586.  
  1587.   SEE ALSO : FOSSIL_Read_Chr
  1588.  
  1589.  
  1590.  
  1591. PROCEDURE FOSSIL_DeInit(FOSSIL_Port:Word); (FOSSIL)
  1592.  
  1593.   PURPOSE  : Deinitializes the FOSSIL driver.
  1594.  
  1595.   NOTES    : You should call this procedure when exiting the program.
  1596.              DTR is not affected (carrier is not dropped).
  1597.  
  1598.   SEE ALSO : FOSSIL_Init
  1599.  
  1600.  
  1601.  
  1602. PROCEDURE FOSSIL_Flush_Output(FOSSIL_Port:Word); (FOSSIL)
  1603.  
  1604.   PURPOSE  : Transmits any data still in the outbound buffer.
  1605.  
  1606.   NOTES    : Control will not be returned until all of the data has been
  1607.              sent.
  1608.  
  1609.   SEE ALSO : FOSSIL_Purge_Input, FOSSIL_Purge_Output
  1610.  
  1611.  
  1612.  
  1613. PROCEDURE FOSSIL_GotoXY(X,Y:Byte); (FOSSIL)
  1614.  
  1615.   PURPOSE  : Positions the cursor on the local computer.
  1616.  
  1617.   NOTES    : The upper-left corner is position (1,1).
  1618.  
  1619.   SEE ALSO : FOSSIL_WhereX, FOSSIL_WhereY
  1620.  
  1621.  
  1622.  
  1623. FUNCTION FOSSIL_Init(FOSSIL_Port:Word):Boolean; (FOSSIL)
  1624.  
  1625.   PURPOSE  : Initializes the FOSSIL driver.
  1626.  
  1627.   NOTES    : The function must be called before any other communications
  1628.              routines are called.  Returns TRUE if a FOSSIL driver is
  1629.              installed; FALSE if one was not detected.
  1630.  
  1631.   SEE ALSO : FOSSIL_DeInit
  1632.  
  1633.  
  1634.  
  1635. PROCEDURE FOSSIL_Lower_DTR(FOSSIL_Port:Word); (FOSSIL)
  1636.  
  1637.   PURPOSE  : Lowers the DTR line to the modem.
  1638.  
  1639.   SEE ALSO : FOSSIL_Raise_DTR
  1640.  
  1641.  
  1642.  
  1643. FUNCTION FOSSIL_Peek(FOSSIL_Port:Word):Char; (FOSSIL)
  1644.  
  1645.   PURPOSE  : Returns the next character in the inbound buffer without
  1646.              removing that character from the buffer.
  1647.  
  1648.   NOTES    : FFh (#255) is returned if no characters are in the buffer.
  1649.  
  1650.   SEE ALSO : FOSSIL_Read_Chr
  1651.  
  1652.  
  1653.  
  1654. PROCEDURE FOSSIL_Purge_Input(FOSSIL_Port:Word); (FOSSIL)
  1655.  
  1656.   PURPOSE  : Discards any data in the inbound buffer.
  1657.  
  1658.   SEE ALSO : FOSSIL_Flush_Output, FOSSIL_Purge_Output
  1659.  
  1660.  
  1661.  
  1662. PROCEDURE FOSSIL_Purge_Output(FOSSIL_Port:Word); (FOSSIL)
  1663.  
  1664.   PURPOSE  : Discards any data in the outbound buffer.
  1665.  
  1666.   SEE ALSO : FOSSIL_Flush_Output, FOSSIL_Purge_Input
  1667.  
  1668.  
  1669.  
  1670. PROCEDURE FOSSIL_Raise_DTR(FOSSIL_Port:Word); (FOSSIL)
  1671.  
  1672.   PURPOSE  : Raises the DTR line to the modem.
  1673.  
  1674.   SEE ALSO : FOSSIL_Lower_DTR
  1675.  
  1676.  
  1677.  
  1678. PROCEDURE FOSSIL_Read_Chr(FOSSIL_Port:Word; VAR C:Char); (FOSSIL)
  1679.  
  1680.   PURPOSE  : Reads a character from the FOSSIL driver.
  1681.  
  1682.   NOTES    : The procedure will not return until a character is available
  1683.              in the inbound buffer.
  1684.  
  1685.   SEE ALSO : FOSSIL_Char_Waiting, FOSSIL_Peek, FOSSIL_Xmit_Chr
  1686.  
  1687.  
  1688.  
  1689. PROCEDURE FOSSIL_Reboot_Cold; (FOSSIL)
  1690.  
  1691.   PURPOSE  : Reboots the computer.
  1692.  
  1693.   NOTES    : A cold reboot includes the power-on memory test; a warm
  1694.              reboot does not.  This procedure may fail under a
  1695.              multitasker.
  1696.  
  1697.   SEE ALSO : FOSSIL_Reboot_Warm
  1698.  
  1699.  
  1700.  
  1701. PROCEDURE FOSSIL_Reboot_Warm; (FOSSIL)
  1702.  
  1703.   PURPOSE  : Reboots the computer.
  1704.  
  1705.   NOTES    : A cold reboot includes the power-on memory test; a warm
  1706.              reboot does not.  This procedure may fail under a
  1707.              multitasker.
  1708.  
  1709.   SEE ALSO : FOSSIL_Reboot_Cold
  1710.  
  1711.  
  1712.  
  1713. PROCEDURE FOSSIL_Set_Baud(FOSSIL_Port:Word; Code:Byte); (FOSSIL)
  1714.  
  1715.   PURPOSE  : Sets the baud rate for the specified port.
  1716.  
  1717.   NOTES    : 000 00 0 00
  1718.                │  │ │  └─ Character length
  1719.                │  │ └──── Stop bits
  1720.                │  └────── Parity
  1721.                └───────── Baud rate
  1722.  
  1723.              Refer to MakeBaudCode for an explanation of these bits.
  1724.  
  1725.   SEE ALSO : MakeBaudCode
  1726.  
  1727.  
  1728.  
  1729. PROCEDURE FOSSIL_Watchdog(FOSSIL_Port:Word; Watch:Boolean); (FOSSIL)
  1730.  
  1731.   PURPOSE  : Enables or disables a carrier watchdog function.
  1732.  
  1733.   NOTES    : The watchdog will reboot the system if the caller drops the
  1734.              connection.  This allows the BBS or front-end mailer to regain
  1735.              control of the system (via AUTOEXEC.BAT).  This function
  1736.              may not work under a multitasker.
  1737.  
  1738.   SEE ALSO : FOSSIL_Reboot_Cold, FOSSIL_Reboot_Warm
  1739.  
  1740.  
  1741.  
  1742. FUNCTION FOSSIL_WhereX:Byte; (FOSSIL)
  1743.  
  1744.   PURPOSE  : Returns the horizontal position of the cursor.
  1745.  
  1746.   NOTES    : The upper-left corner is position (1,1).
  1747.  
  1748.   SEE ALSO : FOSSIL_GotoXY, FOSSIL_WhereY
  1749.  
  1750.  
  1751.  
  1752. FUNCTION FOSSIL_WhereY:Byte; (FOSSIL)
  1753.  
  1754.   PURPOSE  : Returns the vertical position of the cursor.
  1755.  
  1756.   NOTES    : The upper-left corner is position (1,1).
  1757.  
  1758.   SEE ALSO : FOSSIL_GotoXY, FOSSIL_WhereX
  1759.  
  1760.  
  1761.  
  1762. PROCEDURE FOSSIL_Xmit_Chr(FOSSIL_Port:Word; C:Char); (FOSSIL)
  1763.  
  1764.   PURPOSE  : Transmits a character.
  1765.  
  1766.   NOTES    : The procedure will not return until there is room in the
  1767.              outbound buffer.
  1768.  
  1769.   SEE ALSO : FOSSIL_Block_Write, FOSSIL_Read_Chr, FOSSIL_Xmit_Chr_No_Wait,
  1770.              FOSSIL_Xmit_Str
  1771.  
  1772.  
  1773.  
  1774. FUNCTION FOSSIL_Xmit_Chr_No_Wait(FOSSIL_Port:Word; C:Char):Boolean; (FOSSIL)
  1775.  
  1776.   PURPOSE  : Attempts to transmit a character.
  1777.  
  1778.   NOTES    : The function returns TRUE if room was available in the
  1779.              outbound buffer; FALSE if not.
  1780.  
  1781.   SEE ALSO : FOSSIL_Block_Write, FOSSIL_Xmit_Chr, FOSSIL_Xmit_Str
  1782.  
  1783.  
  1784.  
  1785. FUNCTION FOSSIL_Xmit_Str(FOSSIL_Port:Word; CONST S:OpenString):Word; (FOSSIL)
  1786.  
  1787.   PURPOSE  : Sends a Turbo Pascal string to the FOSSIL driver.
  1788.  
  1789.   SEE ALSO : FOSSIL_Block_Write, FOSSIL_Xmit_Chr
  1790.  
  1791.  
  1792.  
  1793. FUNCTION GCF(N1,N2:LongInt):LongInt; (Math)
  1794.  
  1795.   PURPOSE  : Calculates the greatest common factor of two integers.
  1796.  
  1797.   SEE ALSO : LCM
  1798.  
  1799.  
  1800.  
  1801. PROCEDURE GenerateRebootCom(p:pChar); (Reboot)
  1802.  
  1803.   PURPOSE  : Generates a COM (executable) file that will invoke a hardware
  1804.              reset of the CPU.
  1805.  
  1806.   NOTES    : Such a program may be useful if your door uses any external
  1807.              batch files (i.e. add-on modules) and you wish to give the
  1808.              sysop the option of rebooting the computer in the event of an
  1809.              emergency.
  1810.  
  1811.              This command is very dangerous.  Use with care.
  1812.  
  1813.   EXAMPLE  : PROCEDURE MakeBatch;
  1814.                VAR
  1815.                  Batch : Text;
  1816.                BEGIN
  1817.                GenerateRebootCom('REBOOT.COM');
  1818.                Assign(Batch,'RunIGM.Bat');
  1819.                Rewrite(Batch);
  1820.                WriteLn(Batch);
  1821.                WriteLn(Batch,'REM  This is a temporary batch file created');
  1822.                WriteLn(Batch,'REM  by the door when running an IGM.  You');
  1823.                WriteLn(Batch,'REM  may safely delete this file if the door');
  1824.                WriteLn(Batch,'REM  is shut down on all nodes.');
  1825.                WriteLn(Batch);
  1826.                WriteLn(Batch,'IF %1~ = ~ GOTO Done');
  1827.                WriteLn(Batch,'%2.EXE %3 %4 %5);
  1828.                WriteLn(Batch,'IF ERRORLEVEL 69 REBOOT.COM
  1829.                WriteLn(Batch,':Done');
  1830.                WriteLn(Batch,'IF FILE EXIST REBOOT.COM DEL REBOOT.COM');
  1831.                Close(Batch);
  1832.                END;
  1833.  
  1834.   SEE ALSO : RebootComputer
  1835.  
  1836.  
  1837.  
  1838. FUNCTION GetBIOSEquipmentList:Word; (XDOS)
  1839.  
  1840.   PURPOSE  : Returns the BIOS equipment list word.
  1841.  
  1842.     FEDCBA98 76543210
  1843.     00000000 00000000
  1844.     ││││││││ │││││││└─ 0 Floppy disk(s) installed
  1845.     ││││││││ ││││││└── 1 80x87 coprocessor installed
  1846.     ││││││││ ││││└┴─── 3 Number of 16K banks of RAM on motherboard (PC)
  1847.     ││││││││ ││││││      Number of 64K banks of RAM on motherboard (XT)
  1848.     ││││││││ ││││└┴─── 3 Unused (PS)
  1849.     ││││││││ ││└┴───── 5 Initial video mode
  1850.     ││││││││ ││          00 EGA, VGA or PGA
  1851.     ││││││││ ││          01 40x25 color
  1852.     ││││││││ ││          10 80x25 color
  1853.     ││││││││ ││          11 80x25 monochrome
  1854.     ││││││││ └┴─────── 7 Number of floppies minus 1, if bit 0 is set
  1855.     │││││││└────────── 8 DMA support installed (PCjr, Tandy 1400LT)
  1856.     │││││││              DMA support not installed (Tandy 1000s)
  1857.     ││││└┴┴─────────── B Number of serial ports installed
  1858.     │││└────────────── C Game port installed
  1859.     ││└─────────────── D Serial printer attached (PCjr)
  1860.     ││                   Internal modem installed (PC/Convertible)
  1861.     └┴──────────────── F Number of parallel ports installed
  1862.  
  1863.  
  1864.  
  1865. PROCEDURE GetCBreak(VAR Break:Boolean); (XDOS)
  1866.  
  1867.   PURPOSE  : Returns the control-breaking status of DOS.
  1868.  
  1869.   NOTES    : If CBreak is off, DOS checks for a ctl-break only during
  1870.              I/O.  When on, DOS checks for a ctl-break at every system call.
  1871.  
  1872.   SEE ALSO : SetCBreak
  1873.  
  1874.  
  1875.  
  1876. PROCEDURE GetDate(VAR Year, Month, Day, DayOfWeek: Word); (XDOS)
  1877.  
  1878.   PURPOSE  : Returns the current date of the operating system.
  1879.  
  1880.   SEE ALSO : CurrentHours, CurrentMinutes, CurrentSeconds, SetDate
  1881.  
  1882.  
  1883.  
  1884. FUNCTION GetDTA:Pointer; (XDOS)
  1885.  
  1886.   PURPOSE  : Returns a pointer to the DOS data exchange buffer (DTA).
  1887.  
  1888.   NOTES    : By default, the DTA address has the offset PSP+80h and
  1889.              a size of 128 bytes.  DTA is used to access files using FCBs.
  1890.  
  1891.  
  1892.  
  1893. FUNCTION GetEnvVar(VarName:pChar):pChar; (XDOS)
  1894.  
  1895.   PURPOSE  : Returns a pointer to the value of an enviroment variable.
  1896.  
  1897.  
  1898.  
  1899. PROCEDURE GetIntVec(IntNo:Byte; VAR Vector: Pointer); (XDOS)
  1900.  
  1901.   PURPOSE  : Returns the vector pointer for the specified interrupt.
  1902.  
  1903.   SEE ALSO : SetIntVec
  1904.  
  1905.  
  1906.  
  1907. FUNCTION GetOverscan:Byte; (Video)
  1908.  
  1909.   PURPOSE  : Returns the current color of the overscan box.
  1910.  
  1911.   NOTES    : The overscan box is the (usually) dark area surrounding the
  1912.              video screen.  Although programs may not write text or
  1913.              graphics to this area, it is possible to change its color.
  1914.  
  1915.   SEE ALSO : SetOverscan
  1916.  
  1917.  
  1918.  
  1919. FUNCTION GetProgDir(VAR p:pChar):pChar; (XDOS)
  1920.  
  1921.   PURPOSE  : Returns the directory of the EXE file.
  1922.  
  1923.  
  1924.  
  1925. FUNCTION GetShiftFlags:Byte; (Keyboard)
  1926.  
  1927.   PURPOSE  : Returns the status of the control keys on the keyboard.
  1928.  
  1929.   NOTES    : 76543210
  1930.              │││││││└ Right shift
  1931.              ││││││└─ Left shift
  1932.              │││││└── Control
  1933.              ││││└─── Alt
  1934.              │││└──── Scroll lock
  1935.              ││└───── Num lock
  1936.              │└────── Caps lock
  1937.              └─────── Insert
  1938.  
  1939.   SEE ALSO : KeyPressed, ReadKey
  1940.  
  1941.  
  1942.  
  1943. FUNCTION GetSwitchChar:Char; (XDOS)
  1944.  
  1945.   PURPOSE  : Returns the default DOS command-line switch character.
  1946.  
  1947.   NOTES    : FFh is returned if this function is not supported by the
  1948.              DOS version on the computer.
  1949.  
  1950.   SEE ALSO : SetSwitchChar
  1951.  
  1952.  
  1953.  
  1954. PROCEDURE GetTime(VAR Hour, Minute, Second, Sec100: Word); (XDOS)
  1955.  
  1956.   PURPOSE  : Obtains the current time of the operating system.
  1957.  
  1958.  
  1959.  
  1960. PROCEDURE GetVerify(VAR Verify:Boolean); (XDOS)
  1961.  
  1962.   PURPOSE  : Obtains the DOS verify status.
  1963.  
  1964.   NOTES    : If on, disk writes are verified to ensure proper writing.
  1965.  
  1966.   SEE ALSO : SetVerify
  1967.  
  1968.  
  1969.  
  1970. FUNCTION GetVideoMode:Byte; (Video)
  1971.  
  1972.   PURPOSE  : Returns the current video mode.
  1973.  
  1974.   SEE ALSO : SetVideoMode
  1975.  
  1976.  
  1977.  
  1978. FUNCTION Grd_Deg (CONST G:Float) : Float; (Math)
  1979.  
  1980.   PURPOSE  : Converts gradians to degrees.
  1981.  
  1982.   SEE ALSO : Deg_Grd, Deg_Rad, Grd_Rad, Rad_Deg, Rad_Grd
  1983.  
  1984.  
  1985.  
  1986. FUNCTION Grd_Rad (CONST G:Float) : Float; (Math)
  1987.  
  1988.   PURPOSE  : Converts gradians to radians.
  1989.  
  1990.   SEE ALSO : Deg_Grd, Deg_Rad, Grd_Deg, Rad_Deg, Rad_Grd
  1991.  
  1992.  
  1993.  
  1994. FUNCTION HangUp:Boolean; (Concerto)
  1995.  
  1996.   PURPOSE  : Hangs up on the caller.
  1997.  
  1998.   NOTES    : The door is not terminated.  Use ExitDoor if you wish to
  1999.              return to the BBS.
  2000.  
  2001.   SEE ALSO : ExitDoor
  2002.  
  2003.  
  2004.  
  2005. PROCEDURE HardwareReset; (Reboot)
  2006.  
  2007.   PURPOSE  : Uses the 8042 keyboard controller chip to invoke a CPU reset.
  2008.              This procedure requires a 286+ and an enhanced keyboard.
  2009.  
  2010.   NOTES    : This procedure will bypass your operating system.  All
  2011.              concurrent tasks will be lost.  Be sure to warn the operator
  2012.              before using this (or any other) reboot procedure.
  2013.  
  2014.   EXAMPLE  : BEGIN
  2015.              IF System.Test8086 > 0 THEN
  2016.                HardwareReset
  2017.              ELSE
  2018.                WriteLn('Error: 286+ not detected.');
  2019.              END;
  2020.  
  2021.   SEE ALSO  : RebootComputer, ColdReboot, WarmReboot
  2022.  
  2023.  
  2024.  
  2025. FUNCTION HexByte(c:Char):Byte; (XStrings)
  2026.  
  2027.   PURPOSE  : Concerts a hexadecimal character to a byte.
  2028.  
  2029.   NOTES    : Valid characters are 0 to 9, A to F and a to f.
  2030.  
  2031.              Hex Dec   Hex Dec
  2032.               0   0     8   8
  2033.               1   1     9   9
  2034.               2   2     A  10
  2035.               3   3     B  11
  2036.               4   4     C  12
  2037.               5   5     D  13
  2038.               6   6     E  14
  2039.               7   7     F  15
  2040.  
  2041.   SEE ALSO : HexInt
  2042.  
  2043.  
  2044.  
  2045. FUNCTION HexInt(p:pChar):LongInt; (XStrings)
  2046.  
  2047.   PURPOSE  : Converts a hexadecimal string to a longint.
  2048.  
  2049.   NOTES    : Valid characters are 0 to 9, A to F and a to f.
  2050.  
  2051.   SEE ALSO : HexByte
  2052.  
  2053.  
  2054.  
  2055. PROCEDURE HideStatusLine; (Concerto)
  2056.  
  2057.   PURPOSE  : Hides the current status line, if visible.
  2058.  
  2059.   NOTES    : Each status line is an identifier stored in the IDs collection.
  2060.              The ShowStatus variable contains the index of the visible
  2061.              status line's object in IDs, or -1 is no status line is
  2062.              visible.
  2063.  
  2064.   SEE ALSO : ShowStatusLine
  2065.  
  2066.  
  2067.  
  2068. FUNCTION IncTimeLeft(n:Word):Word; (IO)
  2069.  
  2070.   PURPOSE  : Increases the number of minutes remaining in the session.
  2071.  
  2072.   SEE ALSO : DecTimeLeft
  2073.  
  2074.  
  2075.  
  2076. FUNCTION InDOS:Boolean; (XDOS)
  2077.  
  2078.   PURPOSE  : Returns TRUE if a DOS operation is being performed.  Many
  2079.              DOS services cannot be called if this is so.
  2080.  
  2081.  
  2082.  
  2083. PROCEDURE InitFOSSIL; (Concerto)
  2084.  
  2085.   PURPOSE  : Initializes the FOSSIL I/O driver for remote operation.
  2086.  
  2087.   NOTES    : Intended for INIT.SCR usage only.
  2088.  
  2089.  
  2090.  
  2091. FUNCTION Int_pChar(p:pChar; i:LongInt):pChar; (XStrings)
  2092.  
  2093.   PURPOSE  : Converts a LongInt to a string.
  2094.  
  2095.   NOTES    : The destination must have enough room to hold the worst-case
  2096.              scenerio: a value of -2147483648 (the smallest LongInt possible.
  2097.              Twelve bytes is sufficient to hold ten digits, the negative
  2098.              sign and the terminating null-zero.
  2099.  
  2100.   SEE ALSO : Int_Str
  2101.  
  2102.  
  2103.  
  2104. FUNCTION Int_Str(i:LongInt):STRING; (XStrings)
  2105.  
  2106.   PURPOSE  : Converts a LongInt to a Turbo Pascal string.
  2107.  
  2108.   SEE ALSO : Int_pChar
  2109.  
  2110.  
  2111.  
  2112. FUNCTION IsAlNum(C:Char):Boolean; (XStrings)
  2113.  
  2114.   PURPOSE  : Returns TRUE if the character is a letter or number.
  2115.  
  2116.   SEE ALSO : IsAlpha, IsDigit, IsLower, IsUpper, IsHiBit
  2117.  
  2118.  
  2119.  
  2120. FUNCTION IsAlpha(C:Char):Boolean; (XStrings)
  2121.  
  2122.   PURPOSE  : Returns TRUE if the character is a letter.
  2123.  
  2124.   SEE ALSO : IsAlNum, IsDigit, IsLower, IsUpper, IsHiBit
  2125.  
  2126.  
  2127.  
  2128. FUNCTION IsDigit(C:Char):Boolean; (XStrings)
  2129.  
  2130.   PURPOSE  : Returns TRUE if the character is a number.
  2131.  
  2132.   SEE ALSO : IsAlpha, IsAlNum, IsLower, IsUpper, IsHiBit
  2133.  
  2134.  
  2135.  
  2136. FUNCTION IsHiBit(C:Char):Boolean; (XStrings)
  2137.  
  2138.   PURPOSE  : Returns TRUE if the character is a high-bit ASCII character.
  2139.  
  2140.   SEE ALSO : IsAlpha, IsAlNum, IsDigit, IsLower, IsUpper
  2141.  
  2142.  
  2143.  
  2144. FUNCTION IsLower(C:Char):Boolean; (XStrings)
  2145.  
  2146.   PURPOSE  : Returns TRUE if the character is a lower-case letter.
  2147.  
  2148.   SEE ALSO : IsAlpha, IsAlNum, IsDigit, IsUpper, IsHiBit
  2149.  
  2150.  
  2151.  
  2152. FUNCTION IsUpper(C:Char):Boolean; (XStrings)
  2153.  
  2154.   PURPOSE  : Returns TRUE if the character is an upper-case letter.
  2155.  
  2156.   SEE ALSO : IsAlpha, IsAlNum, IsDigit, IsLower, IsHiBit
  2157.  
  2158.  
  2159.  
  2160. FUNCTION KeyPressed:Boolean; (Keyboard)
  2161.  
  2162.   PURPOSE  : Returns TRUE if a character is waiting in the keyboard buffer.
  2163.  
  2164.   SEE ALSO : ReadKey
  2165.  
  2166.  
  2167.  
  2168. FUNCTION LCM(N1,N2:LongInt):LongInt; (Math)
  2169.  
  2170.   PURPOSE  : Calculates the least common multiple of two integers.
  2171.  
  2172.   SEE ALSO : GCF
  2173.  
  2174.  
  2175.  
  2176. FUNCTION Let(Variable,Equal:pChar):Boolean; (Scripts)
  2177.  
  2178.   PURPOSE  : Assigns a value to the specified variable.
  2179.  
  2180.   RETURNS  : TRUE if the operation was successful, FALSE if not.  The
  2181.              operation will fail if the specified variable is read-only
  2182.              or does not exist.
  2183.  
  2184.  
  2185.  
  2186. PROCEDURE LineChat; (Concerto)
  2187.  
  2188.   PURPOSE  : Acticates the line-by-line scrolling chat-mode.
  2189.  
  2190.   NOTES    : The ChatCfg record contains the chat-mode configuration:
  2191.  
  2192.                tChatCfg = RECORD
  2193.                  ExecPrompt  : pChar;
  2194.                  Flags       : Word;
  2195.                  Greeting    : pChar;
  2196.                  Goodbye     : pChar;
  2197.                  RemoteExit  : Boolean;
  2198.                  SysopColors : tColorScheme;
  2199.                  UserColors  : tColorScheme;
  2200.                  END;
  2201.  
  2202.              The ExecPrompt string is displayed when the sysop presses
  2203.              the forward slash (/) while the cursor is on the left-most
  2204.              column of the screen.  The sysop can then access any command
  2205.              or variable.  The remote callers cannot see the sysop's
  2206.              typing, but will see the result(s) of the commands, if any.
  2207.  
  2208.              The Flags field contains control-flags:
  2209.  
  2210.                FEDCBA9876543210
  2211.                ││││││││││││││║╚═ Chat mode is currently active
  2212.                ││││││││││││││╚══ Force exit
  2213.                └┴┴┴┴┴┴┴┴┴┴┴┴┴─── Reserved
  2214.  
  2215.              Bit 0 is automatically set upon entry into chat-mode and
  2216.              reset upon exit.  Never modify this flag.  Bit 1 is used
  2217.              by the ExitChat procedure to force LineChat to exit.
  2218.              You may set this flag at any time.  The remaining bits
  2219.              are reserved for future use.
  2220.  
  2221.              The Greeting string is displayed whenever the sysops breaks
  2222.              into chat-mode.  The GoodBye string is displayed upon exit.
  2223.              The default Greeting string is '~fgreeting|', which displays
  2224.              the file GREETING.ANS.  The associated script variables
  2225.              are ChatGreeting and ChatGoodbye.
  2226.  
  2227.              The RemoteExit boolean should be TRUE if the remote caller
  2228.              is allowed to exit the chat-mode by pressing ESC (#27).
  2229.  
  2230.              The following script variables allow the sysop to access the
  2231.              individual fields in the two tColorScheme records:
  2232.  
  2233.                ChatSysopDigit     ChatUserDigit
  2234.                ChatSysopHiBit     ChatUserHiBit
  2235.                ChatSysopLower     ChatUserLower
  2236.                ChatSysopPunct     ChatUserPunct
  2237.                ChatSysopUpper     ChatUserUpper
  2238.  
  2239.              The default color scheme uses cyan (3) for characters typed
  2240.              by the sysop and light gray (7) for characters typed by the
  2241.              caller.  The IceChatColors script command changes the color
  2242.              scheme to the palette used by IceChat, a popular chat door.
  2243.  
  2244.   SEE ALSO : ExitChat
  2245.  
  2246.  
  2247.  
  2248. FUNCTION LoadDropFile(p:pChar):Boolean; (Concerto)
  2249.  
  2250.   PURPOSE  : Loads the specified drop file.  If p is NIL, then the
  2251.              procedure uses the path specified in the DropFile variable.
  2252.  
  2253.   NOTES    : Concerto currently supports DORINFOx.DEF, DOOR.SYS and
  2254.              TRIBBS.SYS.  A future version will implement a template
  2255.              system that will allow any drop file to be used with Concerto.
  2256.  
  2257.              DORINFOx.DEF:
  2258.  
  2259.                01: BBS name
  2260.                02: Sysop first name
  2261.                03: Sysop last name
  2262.                04: Communications port
  2263.                05: BPS rate, parity, data bits, stop bits
  2264.                06: Reserved (always zero)
  2265.                07: User's first name
  2266.                08: User's last name
  2267.                09: User's location
  2268.                10: 0=ASCII, 1=ANSI, 2=AVATAR
  2269.                11: User's security level
  2270.                12: User's time remaining in minutes
  2271.  
  2272.  
  2273.              TRIBBS.SYS:
  2274.  
  2275.                01: User's record number
  2276.                02: User's full name
  2277.                03: User's password
  2278.                04: User's security level
  2279.                05: Y=Expert, N=Novice
  2280.                06: Y=ANSI, N=Monochrome
  2281.                07: Minutes left for this call
  2282.                08: User's phone number
  2283.                09: User's city and state
  2284.                10: User's birth date
  2285.                11: Node number
  2286.                12: Seriel port
  2287.                13: Baud rate (0=local)
  2288.                14: Locked rate (0=not locked)
  2289.                15: Y=RTS/CTS, N=no RTS/CTS
  2290.                16: Y=error correction
  2291.                17: BBS Name
  2292.                18: Sysop Name
  2293.  
  2294.  
  2295.  
  2296.  
  2297. PROCEDURE LoadRAConfig(VAR p:pRAConfig); (RA)
  2298.  
  2299.   PURPOSE  : Loads CONFIG.RA.
  2300.  
  2301.   NOTES    : Automatically allocates memory if the pointer is NIL.  Be sure
  2302.              to check for this.
  2303.  
  2304.   SEE ALSO : LoadRASysInfo
  2305.  
  2306.  
  2307.  
  2308. PROCEDURE LoadRASysInfo(VAR SysInfo:SysInfoRecord); (RA)
  2309.  
  2310.   PURPOSE  : Loads SYSINFO.BBS from the system directory.
  2311.  
  2312.   SEE ALSO : LoadRAConfig
  2313.  
  2314.  
  2315.  
  2316. FUNCTION LoCase(c:Char):Char; (XStrings)
  2317.  
  2318.   PURPOSE  : Returns the lower-case version of the character.
  2319.  
  2320.   SEE ALSO : UpCase (SYSTEM.TPU)
  2321.  
  2322.  
  2323.  
  2324. FUNCTION MakeBaudCode(Baud:LongInt):Byte; (FOSSIL)
  2325.  
  2326.   PURPOSE  : Constructs a baud-rate code using 8N1 settings.
  2327.  
  2328.   NOTES    : Bits 7, 6 and 5 of the result specify the baud rate:
  2329.  
  2330.                010 =   300
  2331.                011 =   600
  2332.                100 =  1200
  2333.                101 =  2400
  2334.                110 =  4800
  2335.                111 =  9600
  2336.                000 = 19200 (replaces old 110 baud mask)
  2337.                001 = 38400 (replaces old 150 baud mask)
  2338.  
  2339.              Bits 4 and 3 define the parity:
  2340.  
  2341.                0 0 = No parity
  2342.                1 0 = No parity
  2343.                0 1 = Odd parity
  2344.                1 1 = Even parity
  2345.  
  2346.              Bit 2 defines the stop bits:
  2347.  
  2348.                0   = 1 stop bit
  2349.                1   = 1.5 bits for 5-bit characters, 2 for others
  2350.  
  2351.              Bits 1 and 0 define the character length:
  2352.  
  2353.                0 0 = 5 bits/character
  2354.                0 1 = 6 bits/character
  2355.                1 0 = 7 bits/character
  2356.                1 1 = 8 bits/character
  2357.  
  2358.              This procedure assumes 8N1 (eight bits per character, no
  2359.              parity, one stop bit).
  2360.  
  2361.   SEE ALSO : FOSSIL_Set_Baud
  2362.  
  2363.  
  2364.  
  2365. PROCEDURE MakeDir(Dir:pChar); (XDOS)
  2366.  
  2367.   PURPOSE  : Creates the specified directory.
  2368.  
  2369.   SEE ALSO : RemoveDirectory
  2370.  
  2371.  
  2372.  
  2373. PROCEDURE MakeReadOnly(Variable:pChar); (Scripts)
  2374.  
  2375.   PURPOSE  : Makes a script variable read-only.  A read-only variable cannot
  2376.              be modified by the sysop.
  2377.  
  2378.   NOTES    : This procedure merely flags the variable as read-only.  It
  2379.              offers no protection against physical modification of the
  2380.              EXE using a hex editor or DEBUG.
  2381.  
  2382.   EXAMPLE  : PROCEDURE Protect_Software;
  2383.                BEGIN
  2384.                MakeReadOnly('Author');
  2385.                MakeReadOnly('Copyright');
  2386.                MakeReadOnly('Version');
  2387.                END;
  2388.  
  2389.  
  2390.  
  2391. FUNCTION MaxB(A,B:Byte):Byte; (Math)
  2392.  
  2393.   PURPOSE  : Returns the larger of the two bytes.
  2394.  
  2395.   SEE ALSO : MaxS, MinS, MinB, MaxI, MinI, MaxW, MinW
  2396.  
  2397.  
  2398.  
  2399. FUNCTION MaxI(A,B:Integer):Integer; (Math)
  2400.  
  2401.   PURPOSE  : Returns the larger of the two integers.
  2402.  
  2403.   SEE ALSO : MaxS, MinS, MaxB, MinB, MinI, MaxW, MinW
  2404.  
  2405.  
  2406.  
  2407. FUNCTION MaxS(A,B:ShortInt):ShortInt; (Math)
  2408.  
  2409.   PURPOSE  : Returns the larger of the two ShortInts.
  2410.  
  2411.   SEE ALSO : MinS, MaxB, MinB, MaxI, MinI, MaxW, MinW
  2412.  
  2413.  
  2414.  
  2415. FUNCTION MaxW(A,B:Word):Word; (Math)
  2416.  
  2417.   PURPOSE  : Returns the larger of the two words.
  2418.  
  2419.   SEE ALSO : MaxS, MinS, MaxB, MinB, MaxI, MinI, MinW
  2420.  
  2421.  
  2422.  
  2423. FUNCTION MinB(A,B:Byte):Byte; (Math)
  2424.  
  2425.   PURPOSE  : Returns the lesser of the two bytes.
  2426.  
  2427.   SEE ALSO : MaxS, MinS, MaxB, MaxI, MinI, MaxW, MinW
  2428.  
  2429.  
  2430.  
  2431. FUNCTION MinI(A,B:Integer):Integer; (Math)
  2432.  
  2433.   PURPOSE  : Returns the lesser of the two integers.
  2434.  
  2435.   SEE ALSO : MaxS, MinS, MaxB, MinB, MaxI, MaxW, MinW
  2436.  
  2437.  
  2438.  
  2439. FUNCTION MinS(A,B:ShortInt):ShortInt; (Math)
  2440.  
  2441.   PURPOSE  : Returns the lesser of the two ShortInts.
  2442.  
  2443.   SEE ALSO : MaxS, MaxB, MinB, MaxI, MinI, MaxW, MinW
  2444.  
  2445.  
  2446.  
  2447. FUNCTION MinW(A,B:Word):Word; (Math)
  2448.  
  2449.   PURPOSE  : Returns the lesser of the two words.
  2450.  
  2451.   SEE ALSO : MaxS, MinS, MaxB, MinB, MaxI, MinI, MaxW
  2452.  
  2453.  
  2454.  
  2455. FUNCTION Monochrome:Boolean; (Video)
  2456.  
  2457.   PURPOSE  : Returns TRUE if the local computer is using a monochrome
  2458.              adapter.
  2459.  
  2460.  
  2461.  
  2462. FUNCTION nCr(N,R:LongInt):LongInt; (Math)
  2463.  
  2464.   PURPOSE  : Calculates the number of combinations.
  2465.  
  2466.   SEE ALSO : Factorial, nPr
  2467.  
  2468.  
  2469.  
  2470. FUNCTION NLogX(N,X:Float):Float; (Math)
  2471.  
  2472.   PURPOSE  : Calculates the Nth base log of X.
  2473.  
  2474.  
  2475.  
  2476. FUNCTION nPr(N,R:LongInt):LongInt; (Math)
  2477.  
  2478.   PURPOSE  : Calculates the number of permutations.
  2479.  
  2480.   SEE ALSO : Factorial, nCr
  2481.  
  2482.  
  2483.  
  2484. PROCEDURE NullProc; (Slicer)
  2485.  
  2486.   PURPOSE  : Does nothing.
  2487.  
  2488.   SEE ALSO : ForceFalse, ForceTrue
  2489.  
  2490.  
  2491.  
  2492. PROCEDURE OpenClipboard; (Win95)
  2493.  
  2494.   PURPOSE  : Opens the Windows clipboard.
  2495.  
  2496.   NOTES    : You must call this procedure before using any other
  2497.              clipboard procedures.
  2498.  
  2499.   SEE ALSO : CloseClipboard, EmptyClipboard
  2500.  
  2501.  
  2502.  
  2503. FUNCTION OS2:Boolean; (Slicer)
  2504.  
  2505.   PURPOSE  : Returns TRUE if OS/2 (Operating System/2) is detected on
  2506.              the local computer.
  2507.  
  2508.   SEE ALSO : DesqView, DOSShell, DoubleDOS, TopView, Windows, Windows_Real
  2509.  
  2510.  
  2511.  
  2512. FUNCTION OS2_Version:Word; (Slicer)
  2513.  
  2514.   PURPOSE  : Returns the version of OS/2.
  2515.  
  2516.   NOTES    : The major version is returned in the low byte; the minor
  2517.              version is returned in the high byte.  The return value
  2518.              of $0302 (2.3) is remapped to $0003 (3.0).
  2519.  
  2520.   SEE ALSO : DesqView_Version, DOS_Version, DoubleDOS_Version,
  2521.              TopView_Version, Windows_Version
  2522.  
  2523.  
  2524.  
  2525. PROCEDURE PackTime(VAR T:tDateTime; VAR P:LongInt); (XDOS)
  2526.  
  2527.   PURPOSE  : Converts a tDateTime to a 4-byte packed date/time LongInt.
  2528.  
  2529.   NOTES    : The LongInt is used by SetFTime
  2530.  
  2531.   SEE ALSO : SetFTime
  2532.  
  2533.  
  2534.  
  2535. PROCEDURE Parse(p:pChar; VAR Index,Length,Next:Word); (Scripts)
  2536.  
  2537.   PURPOSE  : Parses a token in a string.
  2538.  
  2539.   PARAMS   : p        The string to parse.
  2540.              Index    The starting position of the parser.  Upon return
  2541.                       this variable contains the starting position of
  2542.                       the next token.
  2543.              Length   The length of the token.
  2544.              Next     The suggested starting position of the next Parse call.
  2545.  
  2546.  
  2547.  
  2548. FUNCTION pDelete(p:pChar; Index,Count:Word):pChar; (XStrings)
  2549.  
  2550.   PURPOSE  : Deletes a segment from a string.
  2551.  
  2552.   SEE ALSO : Clip
  2553.  
  2554.  
  2555.  
  2556. FUNCTION Prime(N:LongInt):Boolean; (Math)
  2557.  
  2558.   PURPOSE  : Returns TRUE if the number is prime; FALSE if not.
  2559.  
  2560.  
  2561.  
  2562. PROCEDURE PrintScreen; (Video)
  2563.  
  2564.   PURPOSE  : Dumps the current text screen to the first printer.
  2565.  
  2566.   NOTES    : This is normally invoked by the INT09h handler when the
  2567.              PrtSc (Print Screen) key is pressed.
  2568.  
  2569.  
  2570.  
  2571. PROCEDURE ProtectSourceVars; (Concerto)
  2572.  
  2573.   PURPOSE  : Makes the following script variables read-only:
  2574.  
  2575.              Application
  2576.              Author
  2577.              Build
  2578.              Company
  2579.              Copyright
  2580.              Version
  2581.  
  2582.   NOTES    : The script interpreter ignores any attempts to modify the
  2583.              above variables, thus protecting the true source of the
  2584.              door.  Be aware, of course, that this procedure does not
  2585.              protect against physical modification of the EXE using
  2586.              a hex editor.
  2587.  
  2588.   SEE ALSO : MakeReadOnly
  2589.  
  2590.  
  2591.  
  2592. FUNCTION Pythagoras(A,B:Float):Float; (Math)
  2593.  
  2594.   PURPOSE  : Returns the length of the hypotenuse of a right triangle
  2595.              of the given adjacent lengths.
  2596.  
  2597.  
  2598.  
  2599. FUNCTION p_Boo(p:pChar):Boolean; (XStrings)
  2600.  
  2601.   PURPOSE  : Converts the string to a boolean (TRUE/FALSE) value.
  2602.  
  2603.   NOTES    : Blank strings default to true.  The function will look
  2604.              for T (True), F (False), Y (Yes), N (No), etc.
  2605.  
  2606.  
  2607.  
  2608. FUNCTION p_Char(p:pChar):Char; (XStrings)
  2609.  
  2610.   PURPOSE  : Converts a string to a character.
  2611.  
  2612.   NOTES    :  Method     Example    Result
  2613.               ----------------------------
  2614.               Normal       str        s
  2615.               Decimal      #99        c
  2616.               Hex          $4A        J
  2617.  
  2618.  
  2619.  
  2620. FUNCTION p_Int(p:pChar):LongInt; (XStrings)
  2621.  
  2622.   PURPOSE  : Converts a string into a LongInt.
  2623.  
  2624.   NOTES    : You may specify the number in hexadecimal notation is you
  2625.              start the string with a dollar sign ($). Example: $DEADBEEF
  2626.  
  2627.   SEE ALSO : Str_Int
  2628.  
  2629.  
  2630.  
  2631. FUNCTION Rad_Deg (CONST R:Float) : Float; (Math)
  2632.  
  2633.   PURPOSE  : Converts radians to degrees.
  2634.  
  2635.   SEE ALSO : Deg_Grd, Deg_Rad, Grd_Deg, Grd_Rad, Rad_Grd
  2636.  
  2637.  
  2638.  
  2639. FUNCTION Rad_Grd (CONST R:Float) : Float; (Math)
  2640.  
  2641.   PURPOSE  : Converts radians to gradians.
  2642.  
  2643.   SEE ALSO : Deg_Grd, Deg_Rad, Grd_Deg, Grd_Rad, Rad_Deg
  2644.  
  2645.  
  2646.  
  2647. PROCEDURE ReadKey(VAR c:Char); (Keyboard)
  2648.  
  2649.   PURPOSE  : Reads a character from the keyboard.
  2650.  
  2651.   NOTES    : Stores the scan code in ScanCode.
  2652.  
  2653.   SEE ALSO : KeyPressed
  2654.  
  2655.  
  2656.  
  2657. PROCEDURE RebootComputer(c:Char); (Reboot)
  2658.  
  2659.   PURPOSE  : Executes the selected reboot.
  2660.  
  2661.   PARAMS   : ┌─────┬──────────┐
  2662.              │  c  │  Method  │
  2663.              ├─────┼──────────┤
  2664.              │  c  │   Cold   │
  2665.              │  h  │ Hardware │
  2666.              │  r  │ Hardware │
  2667.              │  w  │   Warm   │
  2668.              └─────┴──────────┘
  2669.  
  2670.   NOTES    : a. The c parameter is not case sensitive.
  2671.              b. The hardware reset method requires a 286 or later.
  2672.              c. The cold and warm reboot methods may cause a general
  2673.                 protection fault (GPF) under some multitaskers.
  2674.  
  2675.   EXAMPLE  : BEGIN
  2676.              WriteLn('WARNING: The computer will now reboot the PC.');
  2677.              WriteLn('Please shut down all applications, then select');
  2678.              WriteLn('the desired reboot method.');
  2679.              WriteLn;
  2680.              WriteLn(' C = Cold Reboot');
  2681.              WriteLn(' H = Hardware Reset (286+)');
  2682.              WriteLn(' W = Warm Reboot (skips memory test)');
  2683.              WriteLn;
  2684.              ReadLn(Method);
  2685.              RebootComputer(Method);
  2686.              WriteLn('REBOOT FAILURE!  Please contact the author.');
  2687.              END;
  2688.  
  2689.   SEE ALSO : ColdReboot, HardwareReset, WarmReboot
  2690.  
  2691.  
  2692.  
  2693. PROCEDURE RegisterAmpersand; (IO)
  2694.  
  2695.   PURPOSE  : Registers the Ampersand state driver.
  2696.  
  2697.   NOTES    : The ampersand driver handles both PCBoard @Xxx codes and
  2698.              WildCat! @xx@ codes, where xx is the hexadecimal representation
  2699.              of a color.
  2700.  
  2701.   SEE ALSO : RegisterANSI, RegisterAVATAR, RegisterControlK, RegisterHexPipe,
  2702.              RegisterLORD
  2703.  
  2704.  
  2705.  
  2706. PROCEDURE RegisterANSI; (IO)
  2707.  
  2708.   PURPOSE  : Registers the ANSI state driver.
  2709.  
  2710.   NOTES    : The driver implements a subset of the full ANSI standard.
  2711.  
  2712.   SEE ALSO : RegisterAmpersand, RegisterAVATAR, RegisterControlK,
  2713.              RegisterHexPipe, RegisterLORD
  2714.  
  2715.  
  2716.  
  2717. PROCEDURE RegisterAVATAR; (IO)
  2718.  
  2719.   PURPOSE  : Registers the AVATAR/0+ state driver.
  2720.  
  2721.   NOTES    : The driver does not handle AVATAR scrolling functions.
  2722.  
  2723.   SEE ALSO : RegisterAmpersand, RegisterANSI, RegisterControlK,
  2724.              RegisterHexPipe, RegisterLORD
  2725.  
  2726.  
  2727.  
  2728. PROCEDURE RegisterBoolean(Name:pChar; Addr:Pointer); (Types)
  2729.  
  2730.   PURPOSE  : Registers a boolean variable with the script interpreter.
  2731.  
  2732.   EXAMPLE  : RegisterBoolean('DirectVideo',@CRT.DirectVideo);
  2733.  
  2734.  
  2735.  
  2736. PROCEDURE RegisterByte(Name:pChar; Addr:Pointer); (Types)
  2737.  
  2738.   PURPOSE  : Registers a byte with the script interpreter.
  2739.  
  2740.   EXAMPLE  : RegisterByte('TextAttr',@CRT.TextAttr);
  2741.  
  2742.  
  2743.  
  2744. PROCEDURE RegisterChar(Name:pChar; Addr:Pointer); (Types)
  2745.  
  2746.   PURPOSE  : Registers a character with the script interpeter.
  2747.  
  2748.   EXAMPLE  : RegisterChar('YourChar',@YourChar);
  2749.  
  2750.  
  2751.  
  2752. PROCEDURE RegisterConcerto; (Concerto)
  2753.  
  2754.   PURPOSE  : Registers the Concerto door enviroment.  This includes the
  2755.              run-time library, the color-code systems, the control-code
  2756.              system and the descriptive-macro system.
  2757.  
  2758.   NOTES    : This procedure is mandatory.
  2759.  
  2760.  
  2761.  
  2762. PROCEDURE RegisterControlK; (IO)
  2763.  
  2764.   PURPOSE  : Registers the ^K state driver.
  2765.  
  2766.   NOTES    : Control-K codes are in the format ^K[xx, where ^K is ASCII
  2767.              character #11 and xx is the hexadecimal representation of
  2768.              a color.  These codes are used by the RemoteAccess BBS package.
  2769.  
  2770.   SEE ALSO : RegisterAmpersand, RegisterANSI, RegisterAVATAR,
  2771.              RegisterHexPipe, RegisterLORD
  2772.  
  2773.  
  2774.  
  2775. PROCEDURE RegisterDirectory(Name:pChar; Addr:Pointer); (Types)
  2776.  
  2777.   Registers a pChar holding a directory name.  The object makes sure that
  2778.   the string always contains a terminating slash character (/).  The string
  2779.   is automatically disposed upon termination of the door.
  2780.  
  2781.  
  2782.  
  2783. PROCEDURE RegisterDynamic(Name:pChar; Addr:Pointer); (Types)
  2784.  
  2785.   PURPOSE  : Registers a pChar with the script interpreter.  The string
  2786.              is automatically disposed with StrDispose upon termination
  2787.              of the program.
  2788.  
  2789.   SEE ALSO : RegisterDynamicNoDipose
  2790.  
  2791.  
  2792.  
  2793. PROCEDURE RegisterDynamicNoDispose(Name:pChar; Addr:Pointer); (Types)
  2794.  
  2795.   PURPOSE  : Registers a pChar with the script interpreter.  The
  2796.              string is not disposed by the interpreter upon termination
  2797.              of the program.  You must check for a non-NIL value and
  2798.              call StrDispose yourself!
  2799.  
  2800.   SEE ALSO : RegisterDynamic
  2801.  
  2802.  
  2803.  
  2804. PROCEDURE RegisterFCodeSystem; (Concerto)
  2805.  
  2806.   PURPOSE  : Registers the formatting-code/control-code system with Concerto.
  2807.  
  2808.   SEE ALSO : RegisterMacroSystem
  2809.  
  2810.  
  2811.  
  2812. PROCEDURE RegisterFunction(Name:pChar; Addr:Pointer; Count:Byte); (Scripts)
  2813.  
  2814.   PURPOSE  : Registers a function with the script interpreter.
  2815.  
  2816.   PARAMS   : Name     The name of the function (not case-sensitive).
  2817.              Addr     The address of the function handler.
  2818.              Count    The number of parameters to send to the handler.
  2819.  
  2820.   NOTES    : A function handler is declared as follows:
  2821.  
  2822.  
  2823.              Where <NAME> is the name of the handler, and <POINTER>
  2824.              is the name of a tParams pointer.  The handler must use
  2825.              any other parameters; this will cause memory stack problems.
  2826.  
  2827.  
  2828.  
  2829. PROCEDURE RegisterHexPipe; (IO)
  2830.  
  2831.   PURPOSE  : Registers the HexPipe state driver.
  2832.  
  2833.   NOTES    : HexPipe codes are in the format |xx, where xx is the
  2834.              hexadecimal representation of a color.
  2835.  
  2836.   SEE ALSO : RegisterAmpersand, RegisterANSI, RegisterAVATAR,
  2837.              RegisterControlK, RegisterLORD
  2838.  
  2839.  
  2840.  
  2841. PROCEDURE RegisterLongInt(Name:pChar; Addr:Pointer); (Types)
  2842.  
  2843.   PURPOSE  : Registers a LongInt with the script interpreter.
  2844.  
  2845.   EXAMPLE  : RegisterLongInt('RandSeed',@System.RandSeed);
  2846.  
  2847.  
  2848.  
  2849. PROCEDURE RegisterLORD; (IO)
  2850.  
  2851.   PURPOSE  : Registers the LORD (Legend of the Red Dragon) color system.
  2852.  
  2853.   SEE ALSO : RegisterAmpersand, RegisterANSI, RegisterAVATAR,
  2854.              RegisterControlK, RegisterHexPipe, RegisterLORDFiles
  2855.  
  2856.  
  2857.  
  2858. PROCEDURE RegisterLORDFiles; (LORD)
  2859.  
  2860.   PURPOSE  : Registers the LORD (Legend of the Red Dragon) file paths.
  2861.  
  2862.   NOTES    : This procedure allows you or the sysop to access the various
  2863.              LORD paths in any script or text file.  This can be useful
  2864.              in your installation program.
  2865.  
  2866.              The LORD unit will automatically search for the LORD files
  2867.              at run-time.
  2868.  
  2869.     ┌──────────────┬───────────────┬─────────────────────────────────────┐
  2870.     │  Macro Name  │ LORD.TPU Name │ Path to...                          │
  2871.     ├──────────────┼───────────────┼─────────────────────────────────────┤
  2872.     │ 3RDPARTY.DAT │ LORD_3rdParty │ List of installed IGMs              │
  2873.     │ BADSAY.DAT   │ LORD_BadSay   │ Lamentings for death in user battle │
  2874.     │ GOODSAY.DAT  │ LORD_GoodSay  │ Sayings when user battle is won     │
  2875.     │ LENEMY.DAT   │ LORD_LEnemy   │ Enemy list                          │
  2876.     │ LOCKOUT.DAT  │ LORD_LockOut  │ List of locked-out users            │
  2877.     │ LORD.DAT     │ LORD_Config   │ LORD configuration                  │
  2878.     │ LORDRIP.DAT  │ LORD_RIP      │ RIP (Remote Imaging Protocol) files │
  2879.     │ LORDTXT.DAT  │ LORD_Text     │ Text files libraries                │
  2880.     │ NORMSAY.DAT  │ LORD_NormSay  │ Lamentings for forest death         │
  2881.     │ PLAYER.DAT   │ LORD_Player   │ Player database                     │
  2882.     └──────────────┴───────────────┴─────────────────────────────────────┘
  2883.  
  2884.   SEE ALSO : RegisterLORD
  2885.  
  2886.  
  2887.  
  2888. PROCEDURE RegisterMacroSystem; (Concerto)
  2889.  
  2890.   PURPOSE  : Registers the macro system with Concerto.
  2891.  
  2892.   SEE ALSO : RegisterFCodeSystem
  2893.  
  2894.  
  2895.  
  2896. PROCEDURE RegisterMenu(Name,PathName:pChar); (DMenus)
  2897.  
  2898.   PURPOSE  : Registers a menu with the system.
  2899.  
  2900.   PARAMS   : Name        A keyword to identify the menu in the future.
  2901.                          You must use a unique identifier.
  2902.  
  2903.              PathName    The name of the menu configuration script, or
  2904.                          INTERNAL (not case-sensitive).  The script
  2905.                          is immediately processed if a valid path is
  2906.                          specified; otherwise, it is assumed that you
  2907.                          will create the menu internally.
  2908.  
  2909.  
  2910.  
  2911. PROCEDURE RegisterRASysInfo; (RA)
  2912.  
  2913.   PURPOSE  : Registers the SYSINFO.BBS information with Concerto.
  2914.  
  2915.   NOTES    : The fields of the SYSINFO.BBS record are saved as separate
  2916.              variables in a VAR section (see above).
  2917.  
  2918.  
  2919.  
  2920. PROCEDURE RegisterString(Name:pChar; Addr:Pointer; Len:Byte); (Types)
  2921.  
  2922.   PURPOSE  : Registers a null-terminated string with the script
  2923.              interpreter.  The interpreter is free to assign strings
  2924.              of any length to the variable, up to the specified
  2925.              maximum length.
  2926.  
  2927.  
  2928.  
  2929. PROCEDURE RegisterTPString(Name:pChar; Addr:Pointer; Len:Byte); (Types)
  2930.  
  2931.   PURPOSE  : Registers a Turbo Pascal string with the script interpreter.
  2932.              You must specify the maximum length of the string (not the
  2933.              current length or memory size of the string!).
  2934.  
  2935.   EXAMPLE  : RegisterTPString('YourString',@YourString,255);
  2936.  
  2937.  
  2938.  
  2939. PROCEDURE RegisterWord(Name:pChar; Addr:Pointer); (Types)
  2940.  
  2941.   PURPOSE  : Registers a Word with the script interpreter.
  2942.  
  2943.   EXAMPLE  : RegisterWord('LastMode',@CRT.LastMode);
  2944.  
  2945.  
  2946.  
  2947. PROCEDURE Release; (Slicer)
  2948.  
  2949.   PURPOSE  : Releases the current timeslice back to the operating system.
  2950.  
  2951.   NOTES    : This procedure merely calls Tasker[MT].Release, where MT
  2952.              is a byte indentifying the operating system:
  2953.  
  2954.                  _DOS       = 0;
  2955.                  _DesqView  = 1;
  2956.                  _DoubleDOS = 2;
  2957.                  _OS2       = 3;
  2958.                  _TopView   = 4;
  2959.                  _Windows   = 5;
  2960.  
  2961.              It is more efficient to caller Tasker[MT].Release, although
  2962.              not much more efficient.  You may also force Concerto to
  2963.              use a different method:
  2964.  
  2965.                  Example: Tasker[_Windows].Release
  2966.                  Example: Tasker[_TopView].Release
  2967.  
  2968.  
  2969.   SEE ALSO : DOS_Release, DoubleDOS_Release, TopView_Release, Windows_Release
  2970.  
  2971.  
  2972.  
  2973. PROCEDURE RemoveDirectory(Dir:pChar); (XDOS)
  2974.  
  2975.   PURPOSE  : Removes the specified directory.
  2976.  
  2977.   SEE ALSO : MakeDir
  2978.  
  2979.  
  2980.  
  2981. PROCEDURE RenameFile(OldPath,NewPath:pChar); (XDOS)
  2982.  
  2983.   PURPOSE  : Renames the specified file.
  2984.  
  2985.   NOTES    : Both filespecs must use the same disk drive, although
  2986.              they do not have to specify the same directory.
  2987.  
  2988.  
  2989.  
  2990. PROCEDURE Replace(CONST ThisStr,WithStr:OpenString; VAR InStr:OpenString); (XStrings)
  2991.  
  2992.   PURPOSE  : Replaces a substring with a different string.
  2993.  
  2994.   NOTES    : Replace ThisStr with WithStr in InStr.
  2995.  
  2996.  
  2997.  
  2998. PROCEDURE Ring; (Sounds)
  2999.  
  3000.   PURPOSE  : Simulates a telephone ring on the local computer.
  3001.  
  3002.   SEE ALSO : Siren
  3003.  
  3004.  
  3005.  
  3006. FUNCTION RunMenu(Name:pChar):Byte; (DMenus)
  3007.  
  3008.   PURPOSE  : Executes a previously loaded menu.
  3009.  
  3010.  
  3011.  
  3012. FUNCTION SafeCopy(VAR Dest:pChar; Source:pChar):pChar; (XStrings)
  3013.  
  3014.   PURPOSE  : Copies the contents of Source into Dest.  If Dest in not NIL,
  3015.              then the procedure reallocates memory using StrDispose and
  3016.              StrNew.
  3017.  
  3018.   EXAMPLE  : SafeCopy(MyString,ThisValue);
  3019.                :
  3020.               compare to:
  3021.                :
  3022.              IF MyString<>NIL THEN
  3023.                StrDispose(MyString);
  3024.              MyString:=StrNew(MyString);
  3025.  
  3026.  
  3027.  
  3028. FUNCTION ScanChars(p:pChar; At:Word; List:CharSet):Word; (XStrings)
  3029.  
  3030.   PURPOSE  : Returns the index of the first character in the set.
  3031.  
  3032.   NOTES    : The index of the null-zero is returned if the search
  3033.              is not successful.
  3034.  
  3035.   EXAMPLE  : ScanChars('Hello', 0, ['e','o']) = 1
  3036.              ScanChars('Hello', 2, ['e','o']) = 4
  3037.  
  3038.   SEE ALSO : ScanNChars
  3039.  
  3040.  
  3041.  
  3042. FUNCTION ScanNChars(p:pChar; At:Word; List:CharSet):Word; (XStrings)
  3043.  
  3044.   PURPOSE  : Returns the index of first character NOT in the set.
  3045.  
  3046.   NOTES    : The index of the null-zero is returned if the search
  3047.              is not successful.
  3048.  
  3049.   EXAMPLE  : ScanNChars('Hello', 0, ['H','o']) = 1
  3050.              ScanNChars('Hello', 4, ['H','o']) = 5
  3051.  
  3052.  
  3053.  
  3054. FUNCTION Script(p:pChar):Word; (Scripts)
  3055.  
  3056.   PURPOSE  : Executes a script file.
  3057.  
  3058.   NOTES    : The ScriptDir string is used instead of any specified path,
  3059.              if ScriptDir is not NIL.
  3060.  
  3061.   SEE ALSO : Execute
  3062.  
  3063.  
  3064.  
  3065. FUNCTION SearchFor(p:pChar):pID; (Scripts)
  3066.  
  3067.   PURPOSE  : Scans the list of identifiers stored in IDs and returns a
  3068.              pointer if the specified name exists.
  3069.  
  3070.  
  3071.  
  3072. FUNCTION SEC(CONST R:Float):Float; (Math)
  3073.  
  3074.   PURPOSE  : Calculates the secand of the argument.
  3075.  
  3076.   SEE ALSO : COT, CSC, TAN
  3077.  
  3078.  
  3079.  
  3080. FUNCTION SECH(CONST R:Float):Float; (Math)
  3081.  
  3082.   PURPOSE  : Calculates the hyperbolic secant of the argument.
  3083.  
  3084.   SEE ALSO : COSH, COTH, SINH, TANH
  3085.  
  3086.  
  3087.  
  3088. PROCEDURE SetCBreak(Break:Boolean); (XDOS)
  3089.  
  3090.   PURPOSE  : Sets the control-breaking status of DOS.
  3091.  
  3092.   SEE ALSO : GetCBreak
  3093.  
  3094.  
  3095.  
  3096. PROCEDURE SetClipboardData(p:pChar); (Win95)
  3097.  
  3098.   PURPOSE  : Copies the specified text to the Windows clipboard.
  3099.  
  3100.   NOTES    : The clipboard must be open (see OpenClipboard).
  3101.  
  3102.   EXAMPLE  : PROCEDURE WriteString(p:pChar);
  3103.                BEGIN
  3104.                OpenClipboard;
  3105.                SetClipboardData(p);
  3106.                CloseClipboard;
  3107.                END;
  3108.  
  3109.   SEE ALSO : CloseClipboard, OpenClipboard
  3110.  
  3111.  
  3112.  
  3113. FUNCTION SetColorScheme(p:pColorScheme):pColorScheme; (IO)
  3114.  
  3115.   PURPOSE  : Changes to the specified color scheme.
  3116.  
  3117.   NOTES    : The function returns a pointer to the previous color scheme.
  3118.              You should save this value for later restoration.
  3119.  
  3120.   EXAMPLE  : FUNCTION SO_Weird(p:pChar);
  3121.                VAR
  3122.                  Weird    : tColorScheme;
  3123.                  Previous : pColorScheme;
  3124.                BEGIN
  3125.                WITH Weird DO
  3126.                  BEGIN
  3127.                  Lower := Random(256);
  3128.                  Upper := Random(256);
  3129.                  Digit := Random(256);
  3130.                  HiBit := Random(256);
  3131.                  Punct := Random(256);
  3132.                  END;
  3133.                Previous:=SetColorScheme(@Weird);
  3134.                SO_pChar(p);
  3135.                SetColorScheme(Previous);
  3136.                END;
  3137.  
  3138.  
  3139.  
  3140. PROCEDURE SetCursorShape(Define:Word); (Video)
  3141.  
  3142.   PURPOSE  : Defines the shape of the cursor.
  3143.  
  3144.   NOTES    : The high byte defines the top scan line and any options:
  3145.  
  3146.                00000000
  3147.                │││└┴┴┴┴─ Top scan line
  3148.                │└┴────── 00 = Normal
  3149.                │         01 = Invisible
  3150.                │         10 = Erratic
  3151.                │         11 = Slow
  3152.                └──────── Should be zero
  3153.  
  3154.              The low byte contains the bottom scan line.  This service
  3155.              may be buggy on some EGA systems.
  3156.  
  3157.   SEE ALSO : CursorOff, CursorOn
  3158.  
  3159.  
  3160.  
  3161. PROCEDURE SetDate(Year, Month, Day: Word); (XDOS)
  3162.  
  3163.   PURPOSE  : Sets the date of the operating system.
  3164.  
  3165.   NOTES    : The year must be between 1980 and 2099.  Invalid dates
  3166.              are ignored.
  3167.  
  3168.   SEE ALSO : GetDate
  3169.  
  3170.  
  3171.  
  3172. PROCEDURE SetFocus(VM:Word); (Win95)
  3173.  
  3174.   PURPOSE  : Sets the focus to the specified virtual machine.
  3175.  
  3176.   NOTES    : Use VM=0000h to specify the current virtual machine.
  3177.              Windowed DOS boxes are set to full screen.
  3178.  
  3179.  
  3180.  
  3181. PROCEDURE SetIntVec(IntNo:Byte; Vector:Pointer); (XDOS)
  3182.  
  3183.   PURPOSE  : Sets the vector for the specified interrupt number.
  3184.  
  3185.   SEE ALSO : GetIntVec
  3186.  
  3187.  
  3188.  
  3189. FUNCTION SetNoTimeProcedure(p:Pointer):Pointer; (IO)
  3190.  
  3191.   PURPOSE  : Changes the no-time-left procedure.
  3192.  
  3193.   RETURNS  : A pointer to the current procedure, or NIL.
  3194.  
  3195.  
  3196.  
  3197. PROCEDURE SetOverscan(Color:Byte); (Video)
  3198.  
  3199.   PURPOSE  : Sets the color of the overscan box.
  3200.  
  3201.   NOTES    : The overscan box is the (usually) dark area surrounding the
  3202.              video screen.  Although programs may not write text or
  3203.              graphics to this area, it is possible to change its color.
  3204.  
  3205.   SEE ALSO : SetOverscan
  3206.  
  3207.  
  3208.  
  3209. FUNCTION SetSwitchChar(Switch:Char):Boolean; (XDOS)
  3210.  
  3211.   PURPOSE  : Changes the default command-line switch character.
  3212.  
  3213.   NOTES    : Returns TRUE if the function worked, FALSE if not.
  3214.  
  3215.   SEE ALSO : GetSwitchChar
  3216.  
  3217.  
  3218.  
  3219. PROCEDURE SetTime(Hour, Minute, Second, Sec100: Word); (XDOS)
  3220.  
  3221.   PURPOSE  : Sets the time of the operating system.
  3222.  
  3223.   NOTES    : Valid ranges are 0 to 23 hours, 0 to 59 minutes,
  3224.              0 to 59 seconds, and 0 to 99 hundredths of seconds.
  3225.  
  3226.  
  3227.  
  3228. FUNCTION SetTimeOutProcedure(p:Pointer):Pointer; (IO)
  3229.  
  3230.   PURPOSE  : Changes the time-out procedure.
  3231.  
  3232.   RETURNS  : A pointer to the current time-out procedure, or NIL.
  3233.  
  3234.  
  3235.  
  3236. PROCEDURE SetVerify(Verify:Boolean); (XDOS)
  3237.  
  3238.   PURPOSE  : Sets the DOS verify status.
  3239.  
  3240.   NOTES    : If on, disk writes are verified to ensure proper writing.
  3241.  
  3242.   SEE ALSO : GetVerify
  3243.  
  3244.  
  3245.  
  3246. PROCEDURE SetVideoMode(Mode:Byte); (Video)
  3247.  
  3248.   PURPOSE  : Places the video adapter into the specified mode.
  3249.  
  3250.   SEE ALSO : GetVideoMode
  3251.  
  3252.  
  3253.  
  3254. FUNCTION SetVideoPage(Page:Byte):Boolean; (Video)
  3255.  
  3256.   PURPOSE  : Changes to the specified video page.
  3257.  
  3258.   NOTES    : The function returns TRUE if the page switch worked; FALSE
  3259.              if not.
  3260.  
  3261.  
  3262.  
  3263. FUNCTION SHARE_Install_Status:Byte; (XDOS)
  3264.  
  3265.   PURPOSE  : Returns 0 if SHARE is not installed, 1 if it cannot be
  3266.              installed, and FF if it is installed.
  3267.  
  3268.   SEE ALSO : SHARE_Loaded
  3269.  
  3270.  
  3271.  
  3272. FUNCTION SHARE_Loaded:Boolean; (XDOS)
  3273.  
  3274.   PURPOSE  : Returns TRUE if SHARE.EXE is loaded.
  3275.  
  3276.   SEE ALSO : SHARE_Install_Status
  3277.  
  3278.  
  3279.  
  3280. FUNCTION ShiftRight(p:pChar; n:Word; c:Char):pChar; (XStrings)
  3281.  
  3282.   PURPOSE  : Shifts the characters in the string toward the right.
  3283.  
  3284.   NOTES    : The start of the string is filled with the specified
  3285.              character.  This is normally #32 (spaces).
  3286.  
  3287.   EXAMPLES : ShiftRight('Hello', 3, ' ') = '   Hello'
  3288.  
  3289.  
  3290.  
  3291. PROCEDURE ShowStatusLine(p:pChar); (Concerto)
  3292.  
  3293.   PURPOSE  : Shows the specified status line, where p is the name of
  3294.              the identifier saved in the IDs collection.
  3295.  
  3296.   EXAMPLE  : BEGIN
  3297.              CASE Random(3) OF
  3298.                0 : ShowStatusLine('Help');
  3299.                1 : ShowStatusLine('Quote');
  3300.                2 : ShowStatusLine('Peter');
  3301.                END;
  3302.              END;
  3303.  
  3304.   SEE ALSO : HideStatusLine
  3305.  
  3306.  
  3307.  
  3308. FUNCTION Simpson(CONST y:tFUNCTION; CONST a,b,n:LongInt):Float; (Math)
  3309.  
  3310.   PURPOSE  : Calculates the area under the curve of the given function,
  3311.              using Simpson's approximation procedure.
  3312.  
  3313.   PARAMS   : y  =  A Turbo Pascal function: FUNCTION(x:Float):Float
  3314.              a  =  Lower limit
  3315.              b  =  Upper limit
  3316.              n  =  Number of iterations
  3317.  
  3318.  
  3319.  
  3320. FUNCTION SINH(CONST R:Float):Float; (Math)
  3321.  
  3322.   PURPOSE  : Calculates the hyperbolic sine of the argument.
  3323.  
  3324.   SEE ALSO : COSH, COTH, SECH, TANH
  3325.  
  3326.  
  3327.  
  3328. PROCEDURE Siren(Resolution,Amplitude,Midline,DelayFactor,Count:Word); (Sounds)
  3329.  
  3330.   PURPOSE  : Generates a cosine siren on the local computer.
  3331.  
  3332.   NOTES    : A cosine curve looks something like this:
  3333.  
  3334.               1    ∙  .                               .  ∙
  3335.                    │     ∙                         ∙
  3336.                    │       ∙                     ∙
  3337.                    │        ∙                   ∙
  3338.               0  ──┼───────────────────────────────────────
  3339.                    │         ∙                 ∙
  3340.                    │          ∙               ∙
  3341.                    │            ∙           ∙
  3342.              -1    │               ∙  .  ∙
  3343.  
  3344.                    0        π/2       π        3π/2      2π
  3345.  
  3346.              Notice that the cosine graph repeats one full cycle every
  3347.              2π (6.28) units.  This is the basis for many different sirens.
  3348.              The sound at any given point is calculated from this curve.
  3349.  
  3350.   PARAMS   :  Resolution  The cosine curve is divided into a large number
  3351.                           of steps.  The siren cycles through each step and
  3352.                           creates a sound based on the curve at that step.
  3353.                           The number of steps is the resolution of the siren.
  3354.  
  3355.               Amplitude   Each step is multiplied by the amplitude.  Since
  3356.                           the peaks of the curve have a maximum value of +1
  3357.                           and a minimum value of -1, this generates an
  3358.                           effective range of -Amplitude to +Amplitude.
  3359.  
  3360.               Midline     The middle frequency (i.e. the line through the
  3361.                           middle of the curve).  The final range of the
  3362.                           siren is Midline-Amplitude to Midline+Amplitude.
  3363.  
  3364.               Delay       This parameter allows you to tweak the speed of
  3365.                           the siren, which is dependent of the clock speed
  3366.                           of the CPU.  Adjust this factor if the siren
  3367.                           sounds bad.
  3368.  
  3369.               Count       The number of times to repeat the siren.
  3370.  
  3371.   SEE ALSO : Ring
  3372.  
  3373.  
  3374.  
  3375. FUNCTION SI_Boolean(Prompt:pChar; Default:Boolean):Boolean; (IO)
  3376.  
  3377.   PURPOSE  : This is a high-level boolean-entry routine.
  3378.  
  3379.   NOTES    : The prompt and a color-coded selection-bar is displayed.  The
  3380.              user may press Y (true) or N (false).  The screen is updated
  3381.              with the response (Yes or No).
  3382.  
  3383.   EXAMPLE  : IF SI_Boolean('Clear the screen? ',True) THEN
  3384.                SO_ClrScrWith(7);
  3385.  
  3386.   SEE ALSO : SI_Char
  3387.  
  3388.  
  3389.  
  3390. FUNCTION SI_Char(VAR c:Char):Char; (IO)
  3391.  
  3392.   PURPOSE  : Reads a single character.
  3393.  
  3394.   NOTES    : The character is retrieved from the first IO driver that has
  3395.              a character waiting in its buffer.  Use the Origin pointer if
  3396.              you need to know the exact driver.
  3397.  
  3398.              This is the master keyboard polling routine.  All input
  3399.              routines ultimately call this procedure.
  3400.  
  3401.   SEE ALSO : SI_KeyPressed
  3402.  
  3403.  
  3404.  
  3405. PROCEDURE SI_DefaultMorePrompt; (IO)
  3406.  
  3407.   PURPOSE  : Waits for the enter key (ASCII #13).
  3408.  
  3409.   NOTES    : Nothing is displayed.
  3410.  
  3411.   SEE ALSO : SO_ReadChar
  3412.  
  3413.  
  3414.  
  3415. FUNCTION SI_KeyList(Allowed:pChar; Default:Char):Char; (IO)
  3416.  
  3417.   PURPOSE  : Waits for the user to select one of the characters in the
  3418.              string.  The default character is returned if the user
  3419.              presses Enter, unless the default character is #0 (at which
  3420.              an Enter keystroke is ignored).
  3421.  
  3422.   NOTES    : The character is returned in upper-case.
  3423.  
  3424.   SEE ALSO : SI_KeyListX
  3425.  
  3426.  
  3427.  
  3428. FUNCTION SI_KeyListX(Allowed:pChar; Default:Char):Char; (IO)
  3429.  
  3430.   PURPOSE  : Waits for the user to select one of the characters in the
  3431.              string.  This function is identical to SI_KeyList, except
  3432.              that it displays a fancy prompt before waiting from an
  3433.              entry from the caller.
  3434.  
  3435.   NOTES    : The character is returned in upper-case.
  3436.  
  3437.   SEE ALSO : SI_KeyList
  3438.  
  3439.  
  3440.  
  3441. FUNCTION SI_KeyPressed:Boolean; (IO)
  3442.  
  3443.   PURPOSE  : Returns TRUE if a character is waiting.
  3444.  
  3445.   NOTES    : This is a non-destructive read --  you will still need to
  3446.              use SO_ReadChar to remove the character from the buffer.
  3447.  
  3448.   SEE ALSO : SO_ReadChar
  3449.  
  3450.  
  3451.  
  3452. PROCEDURE SI_LORDMorePrompt; (IO)
  3453.  
  3454.   PURPOSE  : Simulates the LORD (Legend of the Red Dragon) <MORE> prompt.
  3455.  
  3456.   SEE ALSO : SI_DefaultMorePrompt;
  3457.  
  3458.  
  3459.  
  3460. FUNCTION SI_pChar(p:pChar; MaxLen:Byte):pChar; (IO)
  3461.  
  3462.   PURPOSE  : Provides a simple string input routine.
  3463.  
  3464.   NOTES    : MaxLen specifies the maximum length of the string.  It is up
  3465.              to you to make sure that the input field does not wrap across
  3466.              the screen.  If p is not empty, the user will be able to
  3467.              edit the characters.  Minimal range checking is performed.
  3468.  
  3469.   SEE ALSO : SI_Char
  3470.  
  3471.  
  3472.  
  3473. PROCEDURE SI_Purge; (IO)
  3474.  
  3475.   PURPOSE  : Removes any characters from the inbound buffer.
  3476.  
  3477.   SEE ALSO : SO_Purge
  3478.  
  3479.  
  3480.  
  3481. FUNCTION SI_Randomize(p:pChar):Word; (IO)
  3482.  
  3483.   PURPOSE  : Initializes the random number generator.
  3484.  
  3485.   NOTES    : If p is 'Timer', then the random number seed is obtained
  3486.              from the system clock.  If p is 'Ask', then the user is
  3487.              prompted for the number.  Anything other string is
  3488.              converted to a numeric value.
  3489.  
  3490.  
  3491.  
  3492. PROCEDURE SO_Char(c:Char); (IO)
  3493.  
  3494.   PURPOSE  : Displays a single character.
  3495.  
  3496.   SEE ALSO : SO_pChar, SO_SendString
  3497.  
  3498.  
  3499.  
  3500. PROCEDURE SO_ClearRegion(x,y1,y2:Byte); (IO)
  3501.  
  3502.   PURPOSE  : Clears the region within the box.
  3503.  
  3504.   PARAMS   : x    Left-column of box
  3505.              y1   Top row
  3506.              y2   Bottom row
  3507.  
  3508.   NOTES    : This procedure uses the SO_ClrEOL procedure to quickly
  3509.              clear the region.  The cursor is moved to the upper-left
  3510.              corner of the box when finished.
  3511.  
  3512.   SEE ALSO : SO_ClrScr, SO_ClrScrWith
  3513.  
  3514.  
  3515.  
  3516. PROCEDURE SO_ClrEOL; (IO)
  3517.  
  3518.   PURPOSE  : Erases all of the characters between the cursor and the left
  3519.              side of the screen, inclusively.
  3520.  
  3521.   SEE ALSO : SO_ClrEOLWith, SO_ClrScr, SO_ClrScrWith
  3522.  
  3523.  
  3524.  
  3525. PROCEDURE SO_ClrEOLWith(c:Byte); (IO)
  3526.  
  3527.   PURPOSE  : Changes the color and calls SO_ClrEOL at the same time.
  3528.  
  3529.   SEE ALSO : SO_ClrEOL, SO_ClrScr, SO_ClrScrWith, SO_Color
  3530.  
  3531.  
  3532.  
  3533. PROCEDURE SO_ClrScr; (IO)
  3534.  
  3535.   PURPOSE  : Clears the screen using the current color.
  3536.  
  3537.   NOTES    : The status line (if visible) is not affected.  The cursor is
  3538.              moved to the upper-left corner of the screen.
  3539.  
  3540.   SEE ALSO : SO_ClearRegion, SO_ClrEOL, SO_ClrScrWith, SO_Color, SO_GotoXY,
  3541.              SO_Home
  3542.  
  3543.  
  3544.  
  3545. PROCEDURE SO_ClrScrWith(c:Byte); (IO)
  3546.  
  3547.   PURPOSE  : Clears the screen using the specified color.
  3548.  
  3549.   NOTES    : The color change is permanent.
  3550.  
  3551.   SEE ALSO : SO_ClearRegion, SO_ClrEOL, SO_ClrScr, SO_Color, SO_GotoXY,
  3552.              SO_Home
  3553.  
  3554.  
  3555.  
  3556. FUNCTION SO_Color(c:Byte):Byte; (IO)
  3557.  
  3558.   PURPOSE  : Changes the current color.
  3559.  
  3560.   RETURNS  : The current color (before the change).
  3561.  
  3562.   NOTES    : You should never modify TextAttr directly, since the IO drivers
  3563.              will not be aware of the change.  Use this procedure instead,
  3564.              which sends the color change to each driver.
  3565.  
  3566.   SEE ALSO : SO_ClrEOLWith, SO_ClrScrWith
  3567.  
  3568.  
  3569.  
  3570. PROCEDURE SO_CRLF; (IO)
  3571.  
  3572.   PURPOSE  : Outputs a carriage-return/line-feed sequence.
  3573.  
  3574.   NOTES    : This is essentially the same as SO_pChar(#13#10).
  3575.  
  3576.   SEE ALSO : SO_pChar, SO_pCharLn
  3577.  
  3578.  
  3579.  
  3580. PROCEDURE SO_CursorDown(n:Byte); (IO)
  3581.  
  3582.   PURPOSE  : Moves the cursor down.
  3583.  
  3584.   SEE ALSO : SO_CursorLeft, SO_CursorRight, SO_CursorUp, SO_GotoXY, SO_Home
  3585.  
  3586.  
  3587.  
  3588. PROCEDURE SO_CursorLeft(n:Byte); (IO)
  3589.  
  3590.   PURPOSE  : Moves the cursor left.
  3591.  
  3592.   SEE ALSO : SO_CursorDown, SO_CursorRight, SO_CursorUp, SO_GotoXY, SO_Home
  3593.  
  3594.  
  3595.  
  3596. PROCEDURE SO_CursorRight(n:Byte); (IO)
  3597.  
  3598.   PURPOSE  : Moves the cursor right.
  3599.  
  3600.   SEE ALSO : SO_CursorDown, SO_CursorLeft, SO_CursorUp, SO_GotoXY, SO_Home
  3601.  
  3602.  
  3603.  
  3604. PROCEDURE SO_CursorUp(n:Byte); (IO)
  3605.  
  3606.   PURPOSE  : Moves the cursor up.
  3607.  
  3608.   SEE ALSO : SO_CursorDown, SO_CursorLeft, SO_CursorRight, SO_GotoXY, SO_Home
  3609.  
  3610.  
  3611.  
  3612. FUNCTION SO_DateFile(Month,Day:Byte):Boolean; (IO)
  3613.  
  3614.   PURPOSE  : Displays the file MM-DD.ANS, where MM is the specified month
  3615.              and DD is the specified day.  If you call this procedure with
  3616.              Month=0 and Day=0, then the current date is used instead.
  3617.  
  3618.   SEE ALSO : SO_DisplayFile
  3619.  
  3620.  
  3621.  
  3622. FUNCTION SO_DetectANSI(p:pIODriverRemote; Msg:pChar):Boolean; (IO)
  3623.  
  3624.   PURPOSE  : Checks for ANSI capabilities on the remote system.
  3625.  
  3626.   NOTES    : The procedure first sends the special sequence ESC[6n, which
  3627.              is normally used to request the current position of the cursor.
  3628.              We are not actually interested in the cursor position, but
  3629.              rather the response (or lack thereof) of the terminal.
  3630.  
  3631.              ANSI-capable terminals will return the cursor position in
  3632.              the format ESC[#;#R.  A valid response implies ANSI support.
  3633.  
  3634.              If ANSI is not detected, the procedure will ask the user
  3635.              for his/her preference.
  3636.  
  3637.  
  3638.  
  3639. FUNCTION SO_DisplayFile(p:pChar):Boolean; (IO)
  3640.  
  3641.   PURPOSE  : Displays the specified file.
  3642.  
  3643.   NOTES    : Concerto loads the specified file and sends it to SO_pChar for
  3644.              processing.  TRUE is returned if the operation was successful.
  3645.              FALSE is returned if the procedure could not load the file.
  3646.  
  3647.              If TextDir is NIL, Concerto will check the current directory.
  3648.              Otherwise the specified directory will be used.
  3649.  
  3650.              The TextBufferSize variable (IO.PAS) defines the size of the
  3651.              buffer to use when loading the file.  The default value is 1024
  3652.              bytes.
  3653.  
  3654.   SEE ALSO : SO_DateFile, SO_pChar, TextDir
  3655.  
  3656.  
  3657.  
  3658. PROCEDURE SO_GotoXY(x,y:Byte); (IO)
  3659.  
  3660.   PURPOSE  : Changes the position of the the cursor.
  3661.  
  3662.   NOTES    : This procedure changes the position of the cursor in ANSI or
  3663.              AVATAR mode.  The upper-left corner of the screen has the
  3664.              coordinates (1,1).  Invalid coordinates are ignore.
  3665.  
  3666.   SEE ALSO : SO_CursorDown, SO_CursorLeft, SO_CursorRight,
  3667.              SO_CursorUp, SO_Home
  3668.  
  3669.   EXAMPLE  : FOR n:=1 TO Random(200) DO
  3670.                BEGIN
  3671.                SO_GotoXY(Random(80)+1,Random(23)+1);
  3672.                SO_Color(Random(16));
  3673.                SO_SendChar(#219);
  3674.                END;
  3675.  
  3676.   SEE ALSO : SO_CursorDown, SO_CursorLeft, SO_CursorRight,
  3677.              SO_CursorUp, SO_Home
  3678.  
  3679.  
  3680.  
  3681. PROCEDURE SO_Home; (IO)
  3682.  
  3683.   PURPOSE  : Moves the cursor to the home position.
  3684.  
  3685.   NOTES    : This procedure moves the cursor to the upper-left corner
  3686.              of the screen.  This is essentially the same as calling
  3687.              SO_GotoXY(1,1).
  3688.  
  3689.   SEE ALSO : SO_CursorDown, SO_CursorLeft, SO_CursorRight,
  3690.              SO_CursorUp, SO_GotoXY
  3691.  
  3692.  
  3693.  
  3694. PROCEDURE SO_Noise; (IO)
  3695.  
  3696.   PURPOSE  : Generates fake line noise.
  3697.  
  3698.  
  3699.  
  3700. PROCEDURE SO_pChar(p:pChar); (IO)
  3701.  
  3702.   PURPOSE  : Displays the null-terminated string.  Color-codes are processed.
  3703.  
  3704.   NOTES    : This is the Master display routine.  All other output procedures
  3705.              ultimately call this procedure, except for the raw-output set
  3706.              of procedures.
  3707.  
  3708.   SEE ALSO : SO_pCharLn
  3709.  
  3710.  
  3711.  
  3712. PROCEDURE SO_pCharLn(p:pChar); (IO)
  3713.  
  3714.   PURPOSE  : Displays the null-terminated string.
  3715.  
  3716.   NOTES    : A carriage-return/line-feed sequence is also sent.
  3717.  
  3718.   SEE ALSO : SO_CRLF, SO_pChar
  3719.  
  3720.  
  3721.  
  3722. PROCEDURE SO_Purge; (IO)
  3723.  
  3724.   PURPOSE  : Removes any characters from the outbound buffer.
  3725.  
  3726.   SEE ALSO : SI_Purge;
  3727.  
  3728.  
  3729.  
  3730. PROCEDURE SO_RawCentered(p:pChar; ClearLine:Boolean); (IO)
  3731.  
  3732.   PURPOSE  : Centers the string on the current line.  The text on the
  3733.              line will be cleared in ClearLine is TRUE.
  3734.  
  3735.   SEE ALSO : SO_pChar, SO_String
  3736.  
  3737.  
  3738.  
  3739. PROCEDURE SO_RawChar(c:Char); (IO)
  3740.  
  3741.   PURPOSE  : Displays a character with no processing.
  3742.  
  3743.   SEE ALSO : SO_RawpChar, SO_RawString
  3744.  
  3745.  
  3746.  
  3747. PROCEDURE SO_RawpChar(s:pChar); (IO)
  3748.  
  3749.   PURPOSE  : Displays a pChar with no processing.
  3750.  
  3751.   SEE ALSO : SO_RawChar, SO_String
  3752.  
  3753.  
  3754.  
  3755. PROCEDURE SO_RawString(CONST s:OpenString); (IO)
  3756.  
  3757.   PURPOSE  : Displays a TP string with no processing.
  3758.  
  3759.   SEE ALSO : SO_RawChar, SO_RawpChar
  3760.  
  3761.  
  3762.  
  3763. PROCEDURE SO_RepeatChar(c:Char; n:Byte); (IO)
  3764.  
  3765.   PURPOSE  : Repeatedly displays a character.
  3766.  
  3767.   NOTES    : The characters are not processed by the state-driver system.
  3768.  
  3769.   EXAMPLE  : BEGIN
  3770.              SO_pCharLn('Look at this 32x3 box!');
  3771.              SO_Char('┌'); SO_RepeatChar('─', 30); SO_Char('┐);
  3772.              SO_Char('│'); SO_RepeatChar(' ', 30); SO_Char('│');
  3773.              SO_Char('└'); SO_RepeatChar('─', 30); SO_Char('┘');
  3774.              END;
  3775.  
  3776.   SEE ALSO : SO_Char, SO_pChar
  3777.  
  3778.  
  3779.  
  3780. PROCEDURE SO_ShadeBar(Selection:Byte); (IO)
  3781.  
  3782.   PURPOSE  : Displays a shaded bar for general use.
  3783.  
  3784.   NOTES    : This procedure is used by SO_DetectANSI when inquiring the
  3785.              caller about his/her ANSI capabilities.  The bar is six
  3786.              characters long.  Future versions will support scaling.
  3787.  
  3788.              Selection = 0 : Random color palette
  3789.  
  3790.                          1 : Darkgray  ->  White
  3791.                          2 : Green     ->  Yellow
  3792.                          3 : Red       ->  Yellow
  3793.                          4 : Cyan      ->  White
  3794.                          5 : Blue      ->  Light Cyan
  3795.                          6 : Magenta   ->  White
  3796.  
  3797.   SEE ALSO : SO_DetectANSI
  3798.  
  3799.  
  3800.  
  3801. PROCEDURE SO_String(CONST s:OpenString); (IO)
  3802.  
  3803.   PURPOSE  : Displays a classic Turbo Pascal string.
  3804.  
  3805.   NOTES    : The string is converted to a pChar and sent to SO_pChar.
  3806.  
  3807.   SEE ALSO : SO_pChar
  3808.  
  3809.  
  3810.  
  3811. FUNCTION StringOf(n:Byte; c:Char):STRING; (XStrings)
  3812.  
  3813.   PURPOSE  : Returns a TP string filled with the specified character.
  3814.  
  3815.   NOTES    : This function is much like the QBASIC STRING$ function.
  3816.  
  3817.  
  3818.  
  3819. FUNCTION StrInsert(Dest,Source:pChar; Index:Word):pChar; (XStrings)
  3820.  
  3821.   PURPOSE  : Inserts a string into another string.
  3822.  
  3823.   NOTES    : No range checking is performed.
  3824.  
  3825.  
  3826.  
  3827. FUNCTION StrScanI(Str:pChar; Chr:Char):pChar; (XStrings)
  3828.  
  3829.   PURPOSE  : Returns the first occurance of the specified character in
  3830.              the string, or NIL.  This function is identical to StrScan
  3831.              in the STRINGS.TPU unit, except that it is not case-sensitive.
  3832.  
  3833.  
  3834.  
  3835. FUNCTION StrSegment(Dest,Source:pChar; Index,Length:Word):pChar; (XStrings)
  3836.  
  3837.   PURPOSE  : Extracts a segment from a string.
  3838.  
  3839.   PARAMS   : Dest               Destination string.
  3840.              Source             Source string.
  3841.              Index              Start of the segment.
  3842.              Length             Length of the segment.
  3843.  
  3844.   NOTES    : The destination must contain enough room for LENGTH characters
  3845.              plus the terminating null-zero.
  3846.  
  3847.  
  3848.  
  3849. FUNCTION Str_Int(CONST s:OpenString):LongInt; (XStrings)
  3850.  
  3851.   PURPOSE  : Converts a Turbo Pascal string to a LongInt.
  3852.  
  3853.   SEE ALSO : p_Int
  3854.  
  3855.  
  3856.  
  3857. FUNCTION Surface_Area_Box(CONST L,W,H:Float):Float; (Math)
  3858.  
  3859.   PURPOSE  : Calculates the surface area of a box with the given length,
  3860.              width and height.
  3861.  
  3862.                  ┌───┐
  3863.                / │ / │ H
  3864.              ╔═══╗───┘       Surface Area = 2LH + 4WH
  3865.              ║   ║ / W
  3866.              ╚═══╝
  3867.                L
  3868.  
  3869.   SEE ALSO : Surface_Area_Cone, Surface_Area_Cylinder, Surface_Area_Cube,
  3870.              Surface_Area_Sphere
  3871.  
  3872.  
  3873.  
  3874. FUNCTION Surface_Area_Cone(CONST Radius,Height:Float):Float; (Math)
  3875.  
  3876.   PURPOSE  : Calculates the surface area of a cone with the given radius
  3877.              and height.
  3878.  
  3879.   SEE ALSO : Surface_Area_Box, Surface_Area_Cylinder, Surface_Area_Cube,
  3880.              Surface_Area_Sphere
  3881.  
  3882.  
  3883.  
  3884. FUNCTION Surface_Area_Cube(CONST Side:Float):Float; (Math)
  3885.  
  3886.   PURPOSE  : Calculates the surface area of a cube with the given length.
  3887.  
  3888.   SEE ALSO : Surface_Area_Box, Surface_Area_Cone, Surface_Area_Cylinder,
  3889.              Surface_Area_Sphere
  3890.  
  3891.  
  3892.  
  3893. FUNCTION Surface_Area_Cylinder(CONST Radius,Height:Float):Float; (Math)
  3894.  
  3895.   PURPOSE  : Calculates the surface area of a cylinder with the given
  3896.              radius and height.
  3897.  
  3898.   SEE ALSO : Surface_Area_Box, Surface_Area_Cone, Surface_Area_Cube,
  3899.              Surface_Area_Sphere
  3900.  
  3901.  
  3902.  
  3903. FUNCTION Surface_Area_Sphere(CONST Radius:Float):Float; (Math)
  3904.  
  3905.   PURPOSE  : Calculates the surface area of a sphere with the given radius.
  3906.  
  3907.   SEE ALSO : Surface_Area_Box, Surface_Area_Cone, Surface_Area_Cylinder,
  3908.              Surface_Area_Cube
  3909.  
  3910.  
  3911.  
  3912. FUNCTION TAN(CONST R:Float):Float; (Math)
  3913.  
  3914.   PURPOSE  : Calculates the tangent of the argument.
  3915.  
  3916.   SEE ALSO : COT, CSC, SEC
  3917.  
  3918.  
  3919.  
  3920. FUNCTION TANH(CONST R:Float):Float; (Math)
  3921.  
  3922.   PURPOSE  : Calculates the hyperbolic tangent of the argument.
  3923.  
  3924.   SEE ALSO : COSH, COTH, SECH, SINH
  3925.  
  3926.  
  3927.  
  3928. PROCEDURE TextColors(Attr:Byte; VAR Fore,Back:Byte); (Video)
  3929.  
  3930.   PURPOSE  : Extracts the foreground and background colors from a
  3931.              text attribute.
  3932.  
  3933.   NOTES    : 7 6 5 4 3 2 1 0
  3934.              │ │ │ │ │ │ │ │
  3935.              │ │ │ │ └─┴─┴─┴─ Foreground color
  3936.              │ └─┴─┴───────── Background color
  3937.              └─────────────── Blinking bit
  3938.  
  3939.              Rather than calling this procedure, you may do the following:
  3940.  
  3941.              Foreground :=   Attr AND $0F;
  3942.              Background := ( Attr AND $F0 ) SHR 4;
  3943.  
  3944.   EXAMPLE  : PROCEDURE DisplayColors;
  3945.                VAR
  3946.                  FG : Byte;
  3947.                  BG : Byte;
  3948.                BEGIN
  3949.                TextColors(TextAttr,FG,BG);
  3950.                WriteLn('The current foreground color is ',FG,'.');
  3951.                WriteLn('The current background color is ',BG,'.');
  3952.                END;
  3953.  
  3954.  
  3955.  
  3956. FUNCTION TextGfx_ClrEOL(Flags:Byte):STRING; (Video)
  3957.  
  3958.   PURPOSE  : Returns the ASCII, ANSI or AVATAR equivilant of a ClrEOL
  3959.              (clear to end of line) command, based on the Flags byte.
  3960.  
  3961.   NOTES    : The Flags byte is a mask:
  3962.  
  3963.                7 6 5 4 3 2 1 0
  3964.                │ │ │ │ │ │ │ │
  3965.                │ │ │ │ │ │ │ └─ ANSI sequences can be used
  3966.                │ │ │ │ │ │ └─── AVATAR sequences can be used
  3967.                └─┴─┴─┴─┴─┴───── Reserved for future use
  3968.  
  3969.              The function will return the most efficient string possible.
  3970.  
  3971.   SEE ALSO : TextGfx_ClrScr, TextGfx_Color, TextGfx_CursorLeft,
  3972.              TextGfx_CursorRight, TextGfx_GotoXY
  3973.  
  3974.  
  3975.  
  3976. FUNCTION TextGfx_ClrScr(Flags:Byte):STRING; (Video)
  3977.  
  3978.   PURPOSE  : Returns the ASCII, ANSI or AVATAR equivilant of a ClrScr
  3979.              (clear screen) command, based on the Flags byte.
  3980.  
  3981.   NOTES    : Refer to TextGfx_ClrEOL for a description of the Flags byte.
  3982.              The function will return the most efficient string possible.
  3983.  
  3984.   SEE ALSO : TextGfx_ClrEOL, TextGfx_Color, TextGfx_CursorLeft,
  3985.              TextGfx_CursorRight, TextGfx_GotoXY
  3986.  
  3987.  
  3988.  
  3989. FUNCTION TextGfx_Color(Flags,Old,New:Byte):STRING; (Video)
  3990.  
  3991.   PURPOSE  : Returns the ASCII, ANSI or AVATAR equivilant of a Color
  3992.              (set text color) command, based on the Flags byte.
  3993.  
  3994.   NOTES    : Refer to TextGfx_ClrEOL for a description of the Flags byte.
  3995.              The function will return the most efficient string possible.
  3996.  
  3997.   SEE ALSO : TextGfx_ClrEOL, TextGfx_ClrScr, TextGfx_CursorLeft,
  3998.              TextGfx_CursorRight, TextGfx_GotoXY
  3999.  
  4000.  
  4001.  
  4002. FUNCTION TextGfx_CursorLeft(Flags,n:Byte):STRING; (Video)
  4003.  
  4004.   PURPOSE  : Returns the ASCII, ANSI or AVATAR equivilant of a CursorLeft
  4005.              (move cursor left) command, based on the Flags byte.
  4006.  
  4007.   NOTES    : Refer to TextGfx_ClrEOL for a description of the Flags byte.
  4008.              The function will return the most efficient string possible.
  4009.  
  4010.   SEE ALSO : TextGfx_ClrEOL, TextGfx_ClrScr, TextGfx_Color,
  4011.              TextGfx_CursorRight, TextGfx_GotoXY
  4012.  
  4013.  
  4014.  
  4015. FUNCTION TextGfx_CursorRight(Flags,n:Byte):STRING; (Video)
  4016.  
  4017.   PURPOSE  : Returns the ASCII, ANSI or AVATAR equivilant of a CursorRight
  4018.              (move cursor right) command, based on the Flags byte.
  4019.  
  4020.   NOTES    : Refer to TextGfx_ClrEOL for a description of the Flags byte.
  4021.              The function will return the most efficient string possible.
  4022.  
  4023.   SEE ALSO : TextGfx_ClrEOL, TextGfx_ClrScr, TextGfx_Color,
  4024.              TextGfx_CursorLeft, TextGfx_GotoXY
  4025.  
  4026.  
  4027.  
  4028. FUNCTION TextGfx_GotoXY(Flags,X,Y:Byte):STRING; (Video)
  4029.  
  4030.   PURPOSE  : Returns the ASCII, ANSI or AVATAR equivilant of a GotoXY
  4031.              (position cursor) command, based on the Flags byte.
  4032.  
  4033.   NOTES    : Refer to TextGfx_ClrEOL for a description of the Flags byte.
  4034.              The function will return the most efficient string possible.
  4035.  
  4036.   SEE ALSO : TextGfx_ClrEOL, TextGfx_ClrScr, TextGfx_Color,
  4037.              TextGfx_CursorLeft, TextGfx_CursorRight
  4038.  
  4039.  
  4040.  
  4041. FUNCTION TopView:Boolean; (Slicer)
  4042.  
  4043.   PURPOSE  : Returns TRUE if TopView or compatible is loaded.
  4044.  
  4045.   SEE ALSO : DesqView, DOSShell, DoubleDOS, OS2, Windows, Windows_Real
  4046.  
  4047.  
  4048.  
  4049. PROCEDURE TopView_CriticalBegin; (Slicer)
  4050.  
  4051.   PURPOSE  : Disables task-switching in TopView or DesqView.
  4052.  
  4053.   SEE ALSO : TopView_CriticalEnd
  4054.  
  4055.  
  4056.  
  4057. PROCEDURE TopView_CriticalEnd; (Slicer)
  4058.  
  4059.   PURPOSE  : Enables task-switching in TopView or DesqView.
  4060.  
  4061.   SEE ALSO : TopView_CriticalBegin
  4062.  
  4063.  
  4064.  
  4065. PROCEDURE TopView_Release; (Slicer)
  4066.  
  4067.   PURPOSE  : Releases the current timeslice back to TopView or DesqView.
  4068.  
  4069.   SEE ALSO : Release, DOS_Release, DoubleDOS_Release, Windows_Release
  4070.  
  4071.  
  4072.  
  4073. FUNCTION TopView_Version:Word; (Slicer)
  4074.  
  4075.   PURPOSE  : Returns the version of TopView.
  4076.  
  4077.   NOTES    : The major version is returned in the low byte; the minor
  4078.              version is returned in the high byte.
  4079.  
  4080.   SEE ALSO : DesqView_Version, DOS_Version, DoubleDOS_Version, OS2_Version,
  4081.              Windows_Version
  4082.  
  4083.  
  4084.  
  4085. FUNCTION TPErrorMessage(n:Byte):STRING; (XDOS)
  4086.  
  4087.   PURPOSE  : Returns the Turbo Pascal error message for the specified
  4088.              exit code.
  4089.  
  4090.  
  4091.  
  4092. FUNCTION TrimLeft(p:pChar; c:Char):pChar; (XStrings)
  4093.  
  4094.   PURPOSE  : Trims the given character from the left side of a string.
  4095.  
  4096.   SEE ALSO : TrimRight
  4097.  
  4098.  
  4099.  
  4100. FUNCTION TrimRight(p:pChar; c:Char):pChar; (XStrings)
  4101.  
  4102.   PURPOSE  : Trims the given character from the right side of a string.
  4103.  
  4104.   SEE ALSO : TrimLeft
  4105.  
  4106.  
  4107.  
  4108. FUNCTION TrimSpaces(p:pChar):pChar; (XStrings)
  4109.  
  4110.   PURPOSE  : Removes any spaces from the left and right sides of the string.
  4111.  
  4112.   SEE ALSO : Clip, Delete, TrimLeft, TrimRight
  4113.  
  4114.  
  4115.  
  4116. PROCEDURE UnpackTime(P:LongInt; VAR T:tDateTime); (XDOS)
  4117.  
  4118.   PURPOSE  : Converts a file timestamp into a tDateTime record.
  4119.  
  4120.  
  4121.  
  4122. FUNCTION VGA_Detected:Boolean; (Video)
  4123.  
  4124.   PURPOSE  : Returns TRUE if a VGA-compatible adapter was detected.
  4125.  
  4126.   SEE ALSO : EGA_BIOS
  4127.  
  4128.  
  4129.  
  4130. FUNCTION VGA_GetPixel(X,Y:Word):Byte; (Video)
  4131.  
  4132.   PURPOSE  : Returns the color of the pixel at location (X,Y).
  4133.  
  4134.   NOTES    : This function assumes that the adapter is in Mode 13h
  4135.              (320x200x256 VGA).
  4136.  
  4137.   SEE ALSO : GetVideoMode, SetVideoMode, VGA_SetPixel
  4138.  
  4139.  
  4140.  
  4141. PROCEDURE VGA_SetPixel(X,Y:Word; Color:Byte); (Video)
  4142.  
  4143.   PURPOSE  : Changes the pixel at location (X,Y) to the specified color.
  4144.  
  4145.   NOTES    : This procedure assumes that the current video mode is 13h
  4146.              (320x200x256 VGA).
  4147.  
  4148.   SEE ALSO : GetVideoMode, SetVideoMode, VGA_GetPixel
  4149.  
  4150.  
  4151.  
  4152. FUNCTION Volume_Box(CONST X,Y,Z:Float):Float; (Math)
  4153.  
  4154.   PURPOSE  : Calculates the volume of a box with the given lengths.
  4155.  
  4156.   SEE ALSO : Volume_Cone, Volume_Cube, Volume_Cylinder, Volume_Sphere
  4157.  
  4158.  
  4159.  
  4160. FUNCTION Volume_Cone(CONST Radius,Height:Float):Float; (Math)
  4161.  
  4162.   PURPOSE  : Calculates the volume of a cone with the given radius and
  4163.              height.
  4164.  
  4165.   SEE ALSO : Volume_Box, Volume_Cube, Volume_Cylinder, Volume_Sphere
  4166.  
  4167.  
  4168.  
  4169. FUNCTION Volume_Cube(CONST Side:Float):Float; (Math)
  4170.  
  4171.   PURPOSE  : Calculates the volume of a cube with the given side length.
  4172.  
  4173.   SEE ALSO : Volume_Box, Volume_Cone, Volume_Cylinder, Volume_Sphere
  4174.  
  4175.  
  4176.  
  4177. FUNCTION Volume_Cylinder(CONST Radius,Height:Float):Float; (Math)
  4178.  
  4179.   PURPOSE  : Calculates the volume of a cylinder with the given radius
  4180.              and height.
  4181.  
  4182.   SEE ALSO : Volume_Box, Volume_Cone, Volume_Cube, Volume_Sphere
  4183.  
  4184.  
  4185.  
  4186. FUNCTION Volume_Sphere(CONST Radius:Float):Float; (Math)
  4187.  
  4188.   PURPOSE  : Calculates the volume of a sphere with the given radius.
  4189.  
  4190.   SEE ALSO : Volume_Box, Volume_Cone, Volume_Cube, Volume_Cylinder
  4191.  
  4192.  
  4193.  
  4194. PROCEDURE WaitRetrace; (Video)
  4195.  
  4196.   PURPOSE  : Delays the program until it is possible to write to the
  4197.              screen without causing flicker.
  4198.  
  4199.  
  4200.  
  4201. PROCEDURE WarmReboot; (Reboot)
  4202.  
  4203.   PURPOSE  : Invokes a warm reboot on the computer system.
  4204.  
  4205.   NOTES    : A warm reboot will the skip the initial memory test on
  4206.              most computer systems.  This procedure may cause problems
  4207.              in some multitasked and networked enviroments.
  4208.  
  4209.   EXAMPLE  : PROCEDURE SystemHasCrashed;
  4210.                VAR
  4211.                  Loop : Byte;
  4212.                BEGIN
  4213.                WriteLn('The program is unable to recover from a fatal');
  4214.                WriteLn('error.  Rather than return to the BBS and risk');
  4215.                WriteLn('further damage to your system, the computer will');
  4216.                WriteLn('now reboot.  This will allow your AUTOEXEC.BAT');
  4217.                WriteLn('file to restart the BBS.');
  4218.                WriteLn;
  4219.                FOR Loop:=5 DOWNTO 1 DO
  4220.                  BEGIN
  4221.                  Write(Loop,' ');
  4222.                  Ring;
  4223.                  Delay(1000);
  4224.                  END;
  4225.                WarmReboot;
  4226.                END;
  4227.  
  4228.   SEE ALSO : RebootComputer, ColdBoot, HardwareReset
  4229.  
  4230.  
  4231.  
  4232. FUNCTION Windows:Boolean; (Slicer)
  4233.  
  4234.   PURPOSE  : Returns TRUE if Windows 3.x, Windows 95 or Windows NT is
  4235.              detected on the local computer.
  4236.  
  4237.   SEE ALSO : DesqView, DOSShell, DoubleDOS, OS2, TopView, Windows_Real
  4238.  
  4239.  
  4240.  
  4241. PROCEDURE Windows_CriticalBegin; (Slicer)
  4242.  
  4243.   PURPOSE  : Disables task switching in Windows 3.0+
  4244.  
  4245.   SEE ALSO : Windows_CriticalEnd
  4246.  
  4247.  
  4248.  
  4249. PROCEDURE Windows_CriticalEnd; (Slicer)
  4250.  
  4251.   PURPOSE  : Enables task switchin in Windows 3.0+
  4252.  
  4253.   SEE ALSO : Windows_CriticalBegin
  4254.  
  4255.  
  4256.  
  4257. FUNCTION Windows_Real:Boolean; (Slicer)
  4258.  
  4259.   PURPOSE  : Returns TRUE if Windows is running in standard (real) mode.
  4260.  
  4261.   SEE ALSO : DesqView, DOSShell, DoubleDOS, OS2, TopView, Windows
  4262.  
  4263.  
  4264.  
  4265. PROCEDURE Windows_Release; (Slicer)
  4266.  
  4267.   PURPOSE  : Releases the current timeslice to the operating system.
  4268.  
  4269.   NOTES    : This call is supported by Windows 3.0+, DOS 5+, DPMI 1.0+,
  4270.              and OS/2 2.0+ for multitasking DOS applications.  Windows
  4271.              applications should not use this function.
  4272.  
  4273.   SEE ALSO : Release, DOS_Release, DoubleDOS_Release, TopView_Release
  4274.  
  4275.  
  4276.  
  4277. FUNCTION Windows_Version:Word; (Slicer)
  4278.  
  4279.   PURPOSE  : Returns the current Windows version.
  4280.  
  4281.   NOTES    : The major version is returned in the low byte; the minor
  4282.              version is returned in the high byte.  The function is
  4283.              unable to detect the exact version of Windows/386 2.x.
  4284.              All 2.x versions are returned as 2.0.
  4285.  
  4286.   SEE ALSO : DesqView_Version, DOS_Version, DoubleDOS_Version, OS2_Version,
  4287.              TopView_Version
  4288.  
  4289.  
  4290.  
  4291. FUNCTION WinOldApVersion:Word; (Win95)
  4292.  
  4293.   PURPOSE  : Identifies the WinOldAp version.
  4294.  
  4295.   NOTES    : WinOldAp is a Windows extension that allows old applications
  4296.              to access DDE, menus, and the clipboard.
  4297.  
  4298.              Zero is returned if this version of WinOldAp does not
  4299.              support clipboard access.
  4300.  
  4301.   SEE ALSO : CloseClipboard, OpenClipboard, SetClipboardData
  4302.  
  4303.  
  4304.  
  4305. FUNCTION Within_Box(X,Y,X1,Y1,X2,Y2:LongInt):Boolean; (Math)
  4306.  
  4307.   PURPOSE  : Returns TRUE if the point (X,Y) is within the box defined
  4308.              by (X1,Y1) to (X2,Y2).
  4309.  
  4310.   NOTES    : (x1,y1) ┌───────────┐ (x2,y1)
  4311.                      │ ■       ■ │
  4312.                      │           │
  4313.                      │           │
  4314.                      │ ■       ■ │
  4315.              (x1,y2) └───────────┘ (x2,y2)
  4316.  
  4317.  
  4318.  
  4319.  
  4320.